File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -157,8 +157,8 @@ \subsection{Socket Object Methods}
157157
158158\begin {funcdesc }{listen}{backlog}
159159Listen for connections made to the socket.
160- The argument (in the range 0-5) specifies the maximum number of
161- queued connections .
160+ The argument specifies the maximum number of queued connections and
161+ should be at least 1; the maximum value is system-dependent .
162162\end {funcdesc }
163163
164164\begin {funcdesc }{makefile}{mode}
@@ -234,7 +234,7 @@ \subsection{Example}
234234PORT = 50007 # Arbitrary non-privileged server
235235s = socket(AF_INET, SOCK_STREAM)
236236s.bind(HOST, PORT)
237- s.listen(0 )
237+ s.listen(1 )
238238conn, addr = s.accept()
239239print 'Connected by', addr
240240while 1:
Original file line number Diff line number Diff line change @@ -157,8 +157,8 @@ \subsection{Socket Object Methods}
157157
158158\begin {funcdesc }{listen}{backlog}
159159Listen for connections made to the socket.
160- The argument (in the range 0-5) specifies the maximum number of
161- queued connections .
160+ The argument specifies the maximum number of queued connections and
161+ should be at least 1; the maximum value is system-dependent .
162162\end {funcdesc }
163163
164164\begin {funcdesc }{makefile}{mode}
@@ -234,7 +234,7 @@ \subsection{Example}
234234PORT = 50007 # Arbitrary non-privileged server
235235s = socket(AF_INET, SOCK_STREAM)
236236s.bind(HOST, PORT)
237- s.listen(0 )
237+ s.listen(1 )
238238conn, addr = s.accept()
239239print 'Connected by', addr
240240while 1:
You can’t perform that action at this time.
0 commit comments