3 listen \- listens for incoming connections on a socket
6 #include <sys/socket.h>
10 int listen(int \fIsd\fP, int \fIbacklog\fP);
14 listen() puts socket \fIsd\fP into the listening state.
15 \fIbacklog\fP number of incoming connections may be
16 queued before new incoming connections are refused.
17 This function is usually called after bind(2) and before
20 On success, this function returns 0. On error, -1 is returned and
25 The socket is invalid or bind(2) has not been called yet
29 The socket type (example SOCK_DGRAM) does not support listening.
32 The socket does not support listening.