nn::socket::GetSockName Function
s32 GetSockName(
s32 s,
SockAddrIn * sockAddr
);
| Name | Description | |
|---|---|---|
| in | s | Specifies a socket descriptor. Specify a socket descriptor created using the Socket or Accept function. |
| in | sockAddr | Specifies a pointer to the socket address structure used to get the address that is bound to the socket. |
| Value | Description |
|---|---|
| 0 | Process was successful. |
ENETRESET |
Socket library is not initialized. |
EBADF |
Invalid socket descriptor. |
EINVAL |
Invalid processing. |
Gets the socket's local address.
The local address is used as the communication source address. The local address is determined by calling the Bind or Connect functions. If the local address is undetermined, this function returns an error for TCP sockets. For UDP sockets, this function returns the default value of 0.0.0.0.
CONFIDENTIAL