diff options
author | Charles-François Natali <cf.natali@gmail.com> | 2014-05-22 18:45:39 (GMT) |
---|---|---|
committer | Charles-François Natali <cf.natali@gmail.com> | 2014-05-22 18:45:39 (GMT) |
commit | 644b8f52a81cf5d9d8ae263a82541b738872ca46 (patch) | |
tree | e043a45917b9d6a0ab5acf582bf0b0e412f9aad7 /Doc/library/socket.rst | |
parent | 2b00c4999d6d1b517d6b382d6b584b34c0834d32 (diff) | |
download | cpython-644b8f52a81cf5d9d8ae263a82541b738872ca46.zip cpython-644b8f52a81cf5d9d8ae263a82541b738872ca46.tar.gz cpython-644b8f52a81cf5d9d8ae263a82541b738872ca46.tar.bz2 |
Issue #21455: Add a default backlog to socket.listen().
Diffstat (limited to 'Doc/library/socket.rst')
-rw-r--r-- | Doc/library/socket.rst | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 1f5a8e0..3a9d611 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -906,12 +906,15 @@ to sockets. On other platforms, the generic :func:`fcntl.fcntl` and :func:`fcntl.ioctl` functions may be used; they accept a socket object as their first argument. -.. method:: socket.listen(backlog) +.. method:: socket.listen([backlog]) - Listen for connections made to the socket. The *backlog* argument specifies the - maximum number of queued connections and should be at least 0; the maximum value - is system-dependent (usually 5), the minimum value is forced to 0. + Enable a server to accept connections. If *backlog* is specified, it must + be at least 0 (if it is lower, it is set to 0); it specifies the number of + unaccepted connections that the system will allow before refusing new + connections. If not specified, a default reasonable value is chosen. + .. versionchanged:: 3.5 + The *backlog* parameter is now optional. .. method:: socket.makefile(mode='r', buffering=None, *, encoding=None, \ errors=None, newline=None) |