gh-101336: Add keep_alive keyword arg for asyncio create_server() (#112485)

This commit is contained in:
beavailable 2023-12-13 11:23:29 +08:00 committed by GitHub
parent a3a1cb4845
commit 3aea6c4823
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 0 deletions

View file

@ -671,6 +671,7 @@ Creating network servers
flags=socket.AI_PASSIVE, \
sock=None, backlog=100, ssl=None, \
reuse_address=None, reuse_port=None, \
keep_alive=None, \
ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, \
start_serving=True)
@ -735,6 +736,13 @@ Creating network servers
set this flag when being created. This option is not supported on
Windows.
* *keep_alive* set to ``True`` keeps connections active by enabling the
periodic transmission of messages.
.. versionchanged:: 3.13
Added the *keep_alive* parameter.
* *ssl_handshake_timeout* is (for a TLS server) the time in seconds to wait
for the TLS handshake to complete before aborting the connection.
``60.0`` seconds if ``None`` (default).