getsockopt
The getsockopt function retrieves a socket option.
int getsockopt(
SOCKET s,
int level,
int optname,
char FAR *optval,
int FAR *optlen
);
Parameters
s
[in] Descriptor identifying a socket.
level
[in] Level at which the option is defined; the supported levels include SOL_SOCKET and IPPROTO_TCP. See Windows Sockets 2 Protocol-Specific Annex for more information on protocol-specific levels.
optname
[in] Socket option for which the value is to be retrieved.
optval
[out] Pointer to the buffer in which the value for the requested option is to be returned.
optlen
[in, out] Pointer to the size of the optval buffer.