From b87dfd9adc869c00923a271f6fc5430ea97b019f Mon Sep 17 00:00:00 2001 From: glebius Date: Mon, 29 Aug 2005 10:23:46 +0000 Subject: - 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 Wording by: gnn --- lib/libc/sys/listen.2 | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libc/sys/listen.2 b/lib/libc/sys/listen.2 index bcee68f..4c32497 100644 --- a/lib/libc/sys/listen.2 +++ b/lib/libc/sys/listen.2 @@ -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 , -- cgit v1.1