Unit 'Sockets' Package
[Overview][Constants][Types][Procedures and functions][Index] [#rtl]

fpsetsockopt

Set socket options.

Declaration

Source position: socketsh.inc line 169

function fpsetsockopt(

  s: cint;

  level: cint;

  optname: cint;

  optval: pointer;

  optlen: TSockLen

):cint;

Description

fpSetSockOpt sets the connection options for socket S. The socket may be manipulated at different levels, indicated by Level, which can be one of the following:

SOL_SOCKET
To manipulate the socket itself.
XXX
set Level to XXX, the protocol number of the protocol which should interpret the option.

The actual option is stored in a buffer pointed to by optval, with length optlen.

For more information on this call, refer to the UNIX manual page setsockopt

Errors

Errors are reported in SocketError, and include the following:

ESockEBADF
The socket descriptor is invalid.
ESockENOTSOCK
The descriptor is not a socket.
ESockEFAULT
OptVal points outside your address space.

See also

fpGetSockOpt

  

Get current socket options.


Documentation generated on: Nov 24 2024