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