nn::socket::Accept Function
s32 Accept(
s32 s,
SockAddrIn * sockAddr
);
| Name | Description | |
|---|---|---|
| in | s | Specifies a socket descriptor. Specifies a socket descriptor created using the Socket function, to which the Bind function has bound an address, and for which a Listen function call succeeded. |
| out | sockAddr | Specifies a pointer to a socket address structure for recording the socket address of accepted connection partners. |
Accepts incoming connections.
Retrieves the first new socket connection from the connection queue; creates a new socket with the same socket type, protocol, and address family as the specified socket; and returns the new socket descriptor. The original socket is left to continue receiving connection requests.
Unless the socket descriptor is set to blocking mode using the Fcntl function, Accept blocks so long as there are no unprocessed connections in the queue.
This function allocates a backlog of one item in place of the retrieved new socket, but if no backlog could be allocated due to insufficient memory or some other limitation, this function returns ENOMEM whether or not there are any incoming connections.
CONFIDENTIAL