- Document the fact that the real length of listen queue is 1.5 more

than the value of backlog argument.
- Document the fact that a subsequent listen(2) calls on the listening
  socket change the backlog argument.
- Note that current listen queue lengths can be queried using netstat(1).

Submitted by:	Igor Sysoev <is rambler-co.ru>
Wording by:	gnn
This commit is contained in:
Gleb Smirnoff 2005-08-29 10:23:46 +00:00
parent 2c94e1ffc1
commit 83c83f3e46

View File

@ -32,7 +32,7 @@
.\" From: @(#)listen.2 8.2 (Berkeley) 12/11/93
.\" $FreeBSD$
.\"
.Dd May 8, 2002
.Dd August 29, 2005
.Dt LISTEN 2
.Os
.Sh NAME
@ -66,6 +66,16 @@ The
.Fa backlog
argument defines the maximum length the queue of
pending connections may grow to.
The real maximum queue length will be 1.5 times more than the value
specified in the
.Fa backlog
argument.
A subsequent
.Fn listen
system call on the listening socket allows the caller to change the maximum
queue length using a new
.Fa backlog
argument.
If a connection
request arrives with the queue full the client may
receive an error with an indication of
@ -73,6 +83,10 @@ receive an error with an indication of
or, in the case of TCP, the connection will be
silently dropped.
.Pp
Current queue lengths of listening sockets can be queried using
.Xr netstat 1
command.
.Pp
Note that before
.Fx 4.5
and the introduction of the syncache,
@ -140,6 +154,7 @@ The socket is not of a type that supports the operation
.Fn listen .
.El
.Sh SEE ALSO
.Xr netstat 1 ,
.Xr accept 2 ,
.Xr connect 2 ,
.Xr socket 2 ,