Internet Direct (Indy) Version 9.0.1 Beta
TIdSocketHandle.GetSockOpt
Retrieves socket options for a socket descriptor.

procedure GetSockOpt(level: Integer; optname: Integer; optval: PChar; optlen: Integer);
Parameters
level: Integer
Option level Id_SOL_SOCKET, Id_IPPROTO_TCP, or Id_IPPROTO_IP.

optname: Integer
Socket option to retrieve.

optval: PChar
Value for the requested option.

optlen: Integer
Length of the option value buffer.

Description
GetSockOpt is a procedure used to retrieve socket options for the socket descriptor represented by Handle. Options can control socket operations such as receiving Out-Of-Band data, broadcasting datagram packets, and much more.

OptNames is one of the constant values declared in IdStackConts.pas.

OptVal is the resulting socket option after a call to WSGetSockOpt using the global stack instance GStack.

Use SetSockOpt to update the options for a socket descriptor.