summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/listen.2
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1995-11-03 18:34:38 +0000
committerwollman <wollman@FreeBSD.org>1995-11-03 18:34:38 +0000
commit7786ac6f8439a83c2bd10bb28d70b115858173e9 (patch)
tree7b6b903b85189b5e36a6688768889da2879c3e96 /lib/libc/sys/listen.2
parentcfbb3f260a6c68348be1421a29b296eb59896606 (diff)
downloadFreeBSD-src-7786ac6f8439a83c2bd10bb28d70b115858173e9.zip
FreeBSD-src-7786ac6f8439a83c2bd10bb28d70b115858173e9.tar.gz
Document recent changes in socket buffers and listen(2).
Diffstat (limited to 'lib/libc/sys/listen.2')
-rw-r--r--lib/libc/sys/listen.233
1 files changed, 26 insertions, 7 deletions
diff --git a/lib/libc/sys/listen.2 b/lib/libc/sys/listen.2
index 0ab28bc..eaa9522 100644
--- a/lib/libc/sys/listen.2
+++ b/lib/libc/sys/listen.2
@@ -29,9 +29,10 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)listen.2 8.2 (Berkeley) 12/11/93
+.\" From: @(#)listen.2 8.2 (Berkeley) 12/11/93
+.\" $Id$
.\"
-.Dd December 11, 1993
+.Dd November 3, 1995
.Dt LISTEN 2
.Os BSD 4.2
.Sh NAME
@@ -68,6 +69,19 @@ receive an error with an indication of
.Er ECONNREFUSED ,
or, if the underlying protocol supports retransmission,
the request may be ignored so that retries may succeed.
+.Pp
+The
+.Xr sysctl 3
+MIB variable
+.Dq Li kern.somaxconn
+specifies a hard limit on
+.Fa backlog ;
+if a value greater than
+.Li kern.somaxconn
+or less than zero is specified,
+.Fa backlog
+is silently forced to
+.Li kern.somaxconn .
.Sh RETURN VALUES
A 0 return value indicates success; -1 indicates an error.
.Sh ERRORS
@@ -87,15 +101,20 @@ The socket is not of a type that supports the operation
.Fn listen .
.El
.Sh SEE ALSO
+.Xr sysctl 1 ,
.Xr accept 2 ,
.Xr connect 2 ,
-.Xr socket 2
-.Sh BUGS
-The
-.Fa backlog
-is currently limited (silently) to 32.
+.Xr socket 2 ,
+.Xr sysctl 3
.Sh HISTORY
The
.Nm
function call appeared in
.Bx 4.2 .
+The ability to configure the maximum
+.Fa backlog
+at run-time, and to use a negative
+.Fa backlog
+to request the maximum allowable value, was introduced in
+.Tn FreeBSD
+2.2.
OpenPOWER on IntegriCloud