Struct Linger

Socket option that specifies what should happen when the socket that promises reliable delivery still has untransmitted messages when it is closed.

struct Linger ;

Constructors

NameDescription
this (timeout) If timeout is 0, linger is disabled, otherwise enables the linger and sets the timeout.
this (l_onoff, l_linger) System dependent constructor.

Fields

NameTypeDescription
l_linger intTime, in seconds to wait before any buffered data to be sent is discarded.
l_onoff intIf nonzero, close and shutdown block until the data are transmitted or the timeout period has expired.

Properties

NameTypeDescription
enabled[set] const(bool)
enabled[get] bool
time[get] ushort
time[set] const(ushort)Sets timeout period, to wait before closing the socket if the Linger is enabled, ignored otherwise.