StandardSocketOptions. These options may be platform
specific.- Since:
- 1.8
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SocketOption<Integer>Identifies the receive queue that the last incoming packet for the socket was received on.static final SocketOption<UnixDomainPrincipal>Unix Domain peer credentials.static final SocketOption<Integer>Keep-Alive retransmission maximum limit.static final SocketOption<Integer>Keep-Alive idle time.static final SocketOption<Integer>Keep-Alive retransmission interval time.static final SocketOption<Boolean>Disable Delayed Acknowledgements. -
Method Summary
-
Field Details
-
TCP_QUICKACK
Disable Delayed Acknowledgements.This socket option can be used to reduce or disable delayed acknowledgments (ACKs). When
TCP_QUICKACKis enabled, ACKs are sent immediately, rather than delayed if needed in accordance to normal TCP operation. This option is not permanent, it only enables a switch to or fromTCP_QUICKACKmode. Subsequent operations of the TCP protocol will once again disable/enableTCP_QUICKACKmode depending on internal protocol processing and factors such as delayed ACK timeouts occurring and data transfer, therefore this option needs to be set withsetOptionafter each operation of TCP on a given socket.The value of this socket option is a
Booleanthat represents whether the option is enabled or disabled. The socket option is specific to stream-oriented sockets using the TCP/IP protocol. The exact semantics of this socket option are socket type and system dependent.- Since:
- 10
-
TCP_KEEPIDLE
Keep-Alive idle time.The value of this socket option is an
Integerthat is the number of seconds of idle time before keep-alive initiates a probe. The socket option is specific to stream-oriented sockets using the TCP/IP protocol. The exact semantics of this socket option are system dependent.When the
SO_KEEPALIVEoption is enabled, TCP probes a connection that has been idle for some amount of time. The default value for this idle period is system dependent, but is typically 2 hours. TheTCP_KEEPIDLEoption can be used to affect this value for a given socket.- Since:
- 11
-
TCP_KEEPINTERVAL
Keep-Alive retransmission interval time.The value of this socket option is an
Integerthat is the number of seconds to wait before retransmitting a keep-alive probe. The socket option is specific to stream-oriented sockets using the TCP/IP protocol. The exact semantics of this socket option are system dependent.When the
SO_KEEPALIVEoption is enabled, TCP probes a connection that has been idle for some amount of time. If the remote system does not respond to a keep-alive probe, TCP retransmits the probe after some amount of time. The default value for this retransmission interval is system dependent, but is typically 75 seconds. TheTCP_KEEPINTERVALoption can be used to affect this value for a given socket.- Since:
- 11
-
TCP_KEEPCOUNT
Keep-Alive retransmission maximum limit.The value of this socket option is an
Integerthat is the maximum number of keep-alive probes to be sent. The socket option is specific to stream-oriented sockets using the TCP/IP protocol. The exact semantics of this socket option are system dependent.When the
SO_KEEPALIVEoption is enabled, TCP probes a connection that has been idle for some amount of time. If the remote system does not respond to a keep-alive probe, TCP retransmits the probe a certain number of times before a connection is considered to be broken. The default value for this keep-alive probe retransmit limit is system dependent, but is typically 8. TheTCP_KEEPCOUNToption can be used to affect this value for a given socket.- Since:
- 11
-
SO_INCOMING_NAPI_ID
Identifies the receive queue that the last incoming packet for the socket was received on.The value of this socket option is a positive
Integerthat identifies a receive queue that the application can use to split the incoming flows among threads based on the queue identifier. The value is0when the socket is not bound, a packet has not been received, or more generally, when there is no receive queue to identify. The socket option is supported by both stream-oriented and datagram-oriented sockets.The socket option is read-only and an attempt to set the socket option will throw
SocketException.- Since:
- 15
-
SO_PEERCRED
Unix Domain peer credentials.The value of this socket option is a
UnixDomainPrincipalthat represents the credentials of a peer connected to a Unix Domain socket. The credentials are those that applied at the time the socket was first connected or accepted.The socket option is read-only and an attempt to set the socket option will throw
SocketException.SocketExceptionis also thrown when attempting to get the value of the socket option on an unconnected Unix Domain socket.- Since:
- 16
-