diff options
author | Guido van Rossum <guido@python.org> | 1994-03-02 10:52:16 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-03-02 10:52:16 (GMT) |
commit | 5da5755c4a7321e99c00912b8527568f05df19d6 (patch) | |
tree | 50b666859f85e98d7e70e3d3ae0a1193442bdc8b /Doc/lib/libsocket.tex | |
parent | b5f2714e94240f7d07304119351475d137fa3676 (diff) | |
download | cpython-5da5755c4a7321e99c00912b8527568f05df19d6.zip cpython-5da5755c4a7321e99c00912b8527568f05df19d6.tar.gz cpython-5da5755c4a7321e99c00912b8527568f05df19d6.tar.bz2 |
adapt to min value of 1 for listen() backlog argument
Diffstat (limited to 'Doc/lib/libsocket.tex')
-rw-r--r-- | Doc/lib/libsocket.tex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/lib/libsocket.tex b/Doc/lib/libsocket.tex index dfd08c7..375d38e 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: |