Group: Windows Sockets 2 (Winsock) - Library: ws2_32
Winsock: reading and setting socket options
int getsockopt(
SOCKET s,
int level,
int optname,
char FAR *optval,
int FAR *optlen
); DECLARE INTEGER getsockopt IN ws2_32;
INTEGER s,;
INTEGER level,;
INTEGER optname,;
STRING @ optval,;
INTEGER @ optlen s [in] Descriptor identifying a socket.
level [in] Level at which the option is defined; the supported levels include SOL_SOCKET and IPPROTO_TCP.
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.
If no error occurs, getsockopt returns zero. Otherwise, a value of SOCKET_ERROR is returned, and a specific error code can be retrieved by calling WSAGetLastError.
See also setsockopt function.
Home