[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'Sockets' (#rtl)

fpsetsockopt

Set socket options.

Declaration

Source position: socketsh.inc line 174

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 interprete 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:

SYS_EBADF
The socket descriptor is invalid.
SYS_ENOTSOCK
The descriptor is not a socket.
SYS_EFAULT
OptVal points outside your address space.

See also

fpGetSockOpt

  

Get current socket options

The latest version of this document can be found at lazarus-ccr.sourceforge.net.