case classLinger(value: Long) extends SocketOption with Product with Serializable
Configure this socket to have a linger of the specified value
The linger period determines how long pending messages which have yet to be sent to a peer shall linger
in memory after a socket is closed, and further affects the termination of the socket's context.
The following outlines the different behaviours:
The default value of -1 specifies an infinite linger period.
Pending messages shall not be discarded after the socket is closed;
attempting to terminate the socket's context shall block until all pending messages
have been sent to a peer.
The value of 0 specifies no linger period. Pending messages shall be discarded immediately when the socket is closed.
Positive values specify an upper bound for the linger period in milliseconds.
Pending messages shall not be discarded after the socket is closed;
attempting to terminate the socket's context shall block until either all pending messages have been sent to a peer,
or the linger period expires, after which any pending messages shall be discarded.
value
The value in milliseconds for the linger option
Linear Supertypes
Serializable, Serializable, Product, Equals, SocketOption, Request, AnyRef, Any
Configure this socket to have a linger of the specified value
The linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed, and further affects the termination of the socket's context.
The following outlines the different behaviours:
The value in milliseconds for the linger option