Function SocketGetSockName() Professional
Returns the current name of the specified socket.
Syntax
SocketGetSockName( <nSocket> , ;
[@<nError>] ) --> aInetAddr|NIL
Parameters
<nSocket>
This is a numeric socket descriptor identifying a socket.
<nError>
If this parameter is passed by reference to the function, it gets assigned a numeric error code when the function fails. #define constants beginning with WSAE are available in the file SOCKET.CH to identify an error condition.
Return
The function returns an array containing IP address information of the local socket, or NIL on failure. The following #define constants are available in the file SOCKET.CH to access the individual elements of the IP address array:
Constants for the IP address array
Constant | Description |
---|---|
IPADDR_ADDR | Numeric IP address in network byte order. |
IPADDR_FAMILY | Address family (Windows sockets support only AF_INET). |
IPADDR_PORT | Number of port the socket is associated with. |
Feedback
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.