-
- All Known Implementing Classes:
DatagramSocketImpl,SocketImpl
public interface SocketOptionsInterface of methods to get/set socket options. This interface is implemented by: SocketImpl and DatagramSocketImpl. Subclasses of these should override the methods of this interface in order to support their own options.The methods and constants which specify options in this interface are for implementation only. If you're not subclassing SocketImpl or DatagramSocketImpl, you won't use these directly. There are type-safe methods to get/set each of these options in Socket, ServerSocket, DatagramSocket and MulticastSocket.
- Since:
- 1.1
-
-
Field Summary
Fields Modifier and Type Field Description static intIP_MULTICAST_IFSet which outgoing interface on which to send multicast packets.static intIP_MULTICAST_IF2Same as above.static intIP_MULTICAST_LOOPThis option enables or disables local loopback of multicast datagrams.static intIP_TOSThis option sets the type-of-service or traffic class field in the IP header for a TCP or UDP socket.static intSO_BINDADDRFetch the local address binding of a socket (this option cannot be "set" only "gotten", since sockets are bound at creation time, and so the locally bound address cannot be changed).static intSO_BROADCASTSets SO_BROADCAST for a socket.static intSO_KEEPALIVEWhen the keepalive option is set for a TCP socket and no data has been exchanged across the socket in either direction for 2 hours (NOTE: the actual value is implementation dependent), TCP automatically sends a keepalive probe to the peer.static intSO_LINGERSpecify a linger-on-close timeout.static intSO_OOBINLINEWhen the OOBINLINE option is set, any TCP urgent data received on the socket will be received through the socket input stream.static intSO_RCVBUFSet a hint the size of the underlying buffers used by the platform for incoming network I/O.static intSO_REUSEADDRSets SO_REUSEADDR for a socket.static intSO_REUSEPORTSets SO_REUSEPORT for a socket.static int
-