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

fpbind

Bind a socket to an address.

Declaration

Source position: socketsh.inc line 166

function fpbind(

  s: cint;

  addrx: psockaddr;

  addrlen: TSockLen

):cint;

Description

fpBind binds the socket s to address Addrx. Addrx has length Addrlen. The function returns 0 if the call was succesful, -1 if not.

Errors

Errors are returned in SocketError and include the following:

SYS_EBADF
The socket descriptor is invalid.
SYS_EINVAL
The socket is already bound to an address,
SYS_EACCESS
Address is protected and you don't have permission to open it.

More arrors can be found in the Unix man pages.

See also

Socket

  

Create new socket (deprecated)

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