LINGER Structure

 

The latest version of this topic can be found at LINGER Structure.

The LINGER structure is used for manipulating the SO_LINGER and SO_DONTLINGER options of CAsyncSocket::GetSockOpt.

Syntax

struct linger {  
    u_short l_onoff;            // option on/off  
    u_short l_linger;           // linger time  
};  

Remarks

Setting the SO_DONTLINGER option prevents blocking on member function Close while waiting for unsent data to be sent. Setting this option is equivalent to setting SO_LINGER with l_onoff set to 0.

Requirements

Header: winsock2.h

See Also

Structures, Styles, Callbacks, and Message Maps
CAsyncSocket::GetSockOpt
CAsyncSocket::SetSockOpt