listen(int s, int backlog);
DESCRIPTION
To accept connections, a socket is first created with socket(2), a will-
ingness to accept incoming connections and a queue limit for incoming
connections are specified with listen(), and then the connections are
accepted with accept(2). The listen() system call applies only to sock-
ets of type SOCK_STREAM or SOCK_SEQPACKET.
The backlog argument defines the maximum length the queue of pending con-
nections may grow to. The real maximum queue length will be 1.5 times
more than the value specified in the backlog argument. A subsequent
listen() system call on the listening socket allows the caller to change
the maximum queue length using a new backlog argument. If a connection
request arrives with the queue full the client may receive an error with
an indication of ECONNREFUSED, or, in the case of TCP, the connection
will be silently dropped.