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

fpgetsockname

Return name of socket.

Declaration

Source position: socketsh.inc line 171

function fpgetsockname(

  s: cint;

  name: psockaddr;

  namelen: psocklen

):cint;

Description

fpGetSockName returns the current name of the specified socket S. Name should point to enough space to store the name, the amount of space pointed to should be set in Namelen. When the function returns succesfully, Name will be filled with the name, and Namelen will be set to the length of Name.

Errors

Errors are reported in SocketError, and include the following:

SYS_EBADF
The socket descriptor is invalid.
SYS_ENOBUFS
The system doesn't have enough buffers to perform the operation.
SYS_ENOTSOCK
The descriptor is not a socket.
SYS_EFAULT
Addr points outside your address space.

See also

fpBind

  

Bind a socket to an address.

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