fpgetsockopt function
Get current socket options.
Declaration
function fpgetsockopt(s: cint; level: cint; optname: cint;
optval: pointer; optlen: psocklen): cintDescription
fpGetSockOpt gets the connection option
optname, for socket
S.
The socket may be obtained from different levels, indicated by
Level,
which can be one of the following:
- SOL_SOCKET
- From the socket itself.
- XXX
- set
LeveltoXXX, the protocol number of the protocol which should interpret the option.
The options are stored in the memory location pointed to by
optval. optlen should point to the initial length of
optval, and on return will contain the actual length of the
stored data.
On success, 0 is returned. On Error, -1 is returned.
Errors
Errors are reported in SocketError, and include the following:
- ESockEBADF
- The socket descriptor is invalid.
- ESockENOTSOCK
- The descriptor is not a socket.
- ESockEFAULT
-
OptValpoints outside your address space.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
