Go to the previous, next section.
int listen(int s, int backlog);
s: [in] the socket that will accept connections.
backlog: [in] the maximum number of queued connections.
Notifies to the operating system the the task is ready to accept connections on a socket and specifies the maximum number of incomming connections that can be queued for that socket.
On success zero is returned. On error, -1 is returned and errno is
set to one of the following values:
EOPNOTSUPP: the socket protocol does not support the
listen call.
EBADF or ENOTSOCK.
Go to the previous, next section.