help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



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

GetSocketName

Return name of socket.

Declaration

Source position: socketsh.inc line 190

function GetSocketName(

  Sock: LongInt;

  var Addr;

  var Addrlen: LongInt

):LongInt;

Description

GetSockName returns the current name of the specified socket Sock. Addr should point to enough space to store the name, the amount of space pointed to should be set in Addrlen. When the function returns succesfully, Addr will be filled with the name, and Addrlen will be set to the length of Addr.

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

Bind

  

Bind a socket to an address.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505