1.1.24.6 accept
C
int accept(int fd, struct sockaddr *addr, socklen_t *len)
Description
Accept a connection on a socket.
Parameters
Parameters | Description |
---|---|
fd | Socket file descriptor. |
addr | Pointer to a structure to filled in with the address of the peer socket. |
len | Length of address structure. |
Returns
0 - Success.
-1 - Error,
errno
set.
Remarks
errno | Description |
---|---|
EBADF | The argument fd is not a valid file descriptor. |
ENOMEM | Insufficient memory is available. |
EWOULDBLOCK | The socket is marked nonblocking and no connections are present to be accepted. |