Interface DatagramSessionConfig

All Superinterfaces:
IoSessionConfig
All Known Implementing Classes:
AbstractDatagramSessionConfig, AprDatagramSession.SessionConfigImpl, DefaultDatagramSessionConfig, NioDatagramSessionConfig

public interface DatagramSessionConfig extends IoSessionConfig
An IoSessionConfig for datagram transport type.
  • Method Details

    • isBroadcast

      boolean isBroadcast()
      Returns:
      true if SO_BROADCAST is enabled.
      See Also:
    • setBroadcast

      void setBroadcast(boolean broadcast)
      Parameters:
      broadcast - Tells if SO_BROACAST is enabled or not
      See Also:
    • isReuseAddress

      boolean isReuseAddress()
      Returns:
      true if SO_REUSEADDR is enabled.
      See Also:
    • setReuseAddress

      void setReuseAddress(boolean reuseAddress)
      Parameters:
      reuseAddress - Tells if SO_REUSEADDR is enabled or disabled
      See Also:
    • getReceiveBufferSize

      int getReceiveBufferSize()
      Returns:
      the size of the receive buffer
      See Also:
    • setReceiveBufferSize

      void setReceiveBufferSize(int receiveBufferSize)
      Parameters:
      receiveBufferSize - The size of the receive buffer
      See Also:
    • getSendBufferSize

      int getSendBufferSize()
      Returns:
      the size of the send buffer
      See Also:
    • setSendBufferSize

      void setSendBufferSize(int sendBufferSize)
      Parameters:
      sendBufferSize - The size of the send buffer
      See Also:
    • getTrafficClass

      int getTrafficClass()
      Returns:
      the traffic class
      See Also:
    • setTrafficClass

      void setTrafficClass(int trafficClass)
      Parameters:
      trafficClass - The traffic class to set, one of IPTOS_LOWCOST (0x02) IPTOS_RELIABILITY (0x04), IPTOS_THROUGHPUT (0x08) or IPTOS_LOWDELAY (0x10)
      See Also:
    • isCloseOnPortUnreachable

      boolean isCloseOnPortUnreachable()
      If method returns true, it means session should be closed when a PortUnreachableException occurs.
      Returns:
      Tells if we should close if the port is unreachable
    • setCloseOnPortUnreachable

      void setCloseOnPortUnreachable(boolean closeOnPortUnreachable)
      Sets if the session should be closed if an PortUnreachableException occurs.
      Parameters:
      closeOnPortUnreachable - true if we should close if the port is unreachable