Retrieves the local address bound to a socket.
Synopsis
Declared in <folly/net/NetOps.h>
int
getsockname(
NetworkSocket s,
sockaddr* name,
socklen_t* namelen);
Return Value
0 on success, or ‐1 on error.
Parameters
Name |
Description |
s |
The socket to query. |
name |
Buffer that receives the local address. |
namelen |
In/out length of the address buffer. |
Created with MrDocs