nn::socket::Bind Function
s32 Bind(
s32 s,
const SockAddrIn * sockAddr
);
| Name | Description | |
|---|---|---|
| in | s | Specifies the socket descriptor. Specify a socket descriptor created using the Socket function. |
| in | sockAddr | Specify a pointer to a socket address structure (SockAddrIn) with information about the address to assign. |
| Value | Description |
|---|---|
| 0 | Process was successful. |
EADDRINUSE |
The socket address you tried to assign is already being used. |
EAFNOSUPPORT |
The protocol family of the socket does not support the specified address. |
EBADF |
The socket descriptor is invalid. |
EINVAL |
Indicates an illegal call of one of the following. The socket address specified in sockAddr is invalid. The specified socket cannot be used by this process because it is being used for another purpose (for example, the address is already assigned). |
ENETDOWN |
The network is not available. |
ENETRESET |
Socket library is not initialized. |
ENOMEM |
Cannot allocate the memory required for the process. |
Allocates a local socket address to a socket.
The local socket address is the address on the communication source side. A socket created using the Socket function is not initially bound to any address. This function fails if the specified socket descriptor is already bound. You can get the allocated local socket address with GetSockName.
CONFIDENTIAL