Method lrs::socket::Socket::set_linger

Sets the linger setting of this socket.

Syntax

impl Socket {
    fn set_linger(&self, seconds: Option<u32>) -> Result<(), Errno>
}

Arguments

NameDescription
seconds

For how long this socket will linger in the foreground, if at all.

Remarks

If this is set to anything but None, then closing the socket or calling :shut: will block for up to seconds seconds, waiting for all pending outgoing messages to be sent. Afterwards the socket lingers in the background.

See also