From: Guido van Rossum Date: Wed, 2 Mar 1994 10:52:16 +0000 (+0000) Subject: adapt to min value of 1 for listen() backlog argument X-Git-Tag: v1.0.2~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5da5755c4a7321e99c00912b8527568f05df19d6;p=thirdparty%2FPython%2Fcpython.git adapt to min value of 1 for listen() backlog argument --- diff --git a/Doc/lib/libsocket.tex b/Doc/lib/libsocket.tex index dfd08c7283dd..375d38ed4beb 100644 --- a/Doc/lib/libsocket.tex +++ b/Doc/lib/libsocket.tex @@ -157,8 +157,8 @@ encoded as strings). \begin{funcdesc}{listen}{backlog} Listen for connections made to the socket. -The argument (in the range 0-5) specifies the maximum number of -queued connections. +The argument specifies the maximum number of queued connections and +should be at least 1; the maximum value is system-dependent. \end{funcdesc} \begin{funcdesc}{makefile}{mode} @@ -234,7 +234,7 @@ HOST = '' # Symbolic name meaning the local host PORT = 50007 # Arbitrary non-privileged server s = socket(AF_INET, SOCK_STREAM) s.bind(HOST, PORT) -s.listen(0) +s.listen(1) conn, addr = s.accept() print 'Connected by', addr while 1: diff --git a/Doc/libsocket.tex b/Doc/libsocket.tex index dfd08c7283dd..375d38ed4beb 100644 --- a/Doc/libsocket.tex +++ b/Doc/libsocket.tex @@ -157,8 +157,8 @@ encoded as strings). \begin{funcdesc}{listen}{backlog} Listen for connections made to the socket. -The argument (in the range 0-5) specifies the maximum number of -queued connections. +The argument specifies the maximum number of queued connections and +should be at least 1; the maximum value is system-dependent. \end{funcdesc} \begin{funcdesc}{makefile}{mode} @@ -234,7 +234,7 @@ HOST = '' # Symbolic name meaning the local host PORT = 50007 # Arbitrary non-privileged server s = socket(AF_INET, SOCK_STREAM) s.bind(HOST, PORT) -s.listen(0) +s.listen(1) conn, addr = s.accept() print 'Connected by', addr while 1: