1.1.27.9 listen
C
int listen(int fd, int backlog)Description
Listen for connections on a socket.
Parameters
| Parameters | Description |
|---|---|
| fd | Socket file descriptor. |
| backlog | Maximum number of pending connections. |
Returns
- 0 - Success.
- -1 - Error,
errnoset.
Remarks
| errno | Description |
|---|---|
| EADDRINUSE | The referred to by fd is not bound to a local port. |
| EBADF | The argument fd is not a valid file descriptor. |
| ENOTSOCK | The file descriptor fd does not refer to a socket. |
| EOPNOTSUPP | The socket is not of a type that supports the listen() operation. |
| EAGAIN | The socket is nonblocking, and the listening cannot be completed immediately. |
