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. |
ENETRESET |
Socket library is not initialized. |
EBADF |
Invalid socket descriptor. |
EOPNOTSUPP |
Process not supported. |
EINVAL |
Invalid processing. (Socket is already bound to address, etc.) |
EAFNOSUPPORT |
Address family not supported. |
EADDRINUSE |
Address is already in use. |
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