◐ Shell
reader mode source ↗
Skip to content
Merged
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
60 changes: 55 additions & 5 deletions Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ Opening network connections
family=0, proto=0, flags=0, sock=None, \
local_addr=None, server_hostname=None, \
ssl_handshake_timeout=None, \
happy_eyeballs_delay=None, interleave=None)

Open a streaming transport connection to a given
Expand Down Expand Up @@ -456,6 +457,10 @@ Opening network connections
to wait for the TLS handshake to complete before aborting the connection.
``60.0`` seconds if ``None`` (default).

.. versionchanged:: 3.5

Added support for SSL/TLS in :class:`ProactorEventLoop`.
Expand Down Expand Up @@ -484,6 +489,10 @@ Opening network connections

For more information: https://tools.ietf.org/html/rfc6555

.. seealso::

The :func:`open_connection` function is a high-level alternative
Expand Down Expand Up @@ -569,7 +578,8 @@ Opening network connections

.. coroutinemethod:: loop.create_unix_connection(protocol_factory, \
path=None, *, ssl=None, sock=None, \
server_hostname=None, ssl_handshake_timeout=None)

Create a Unix connection.

Expand All @@ -592,6 +602,10 @@ Opening network connections
Added the *ssl_handshake_timeout* parameter.
The *path* parameter can now be a :term:`path-like object`.


Creating network servers
^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -602,7 +616,9 @@ Creating network servers
flags=socket.AI_PASSIVE, \
sock=None, backlog=100, ssl=None, \
reuse_address=None, reuse_port=None, \
ssl_handshake_timeout=None, start_serving=True)

Create a TCP server (socket type :data:`~socket.SOCK_STREAM`) listening
on *port* of the *host* address.
Expand Down Expand Up @@ -662,6 +678,10 @@ Creating network servers
for the TLS handshake to complete before aborting the connection.
``60.0`` seconds if ``None`` (default).

* *start_serving* set to ``True`` (the default) causes the created server
to start accepting connections immediately. When set to ``False``,
the user should await on :meth:`Server.start_serving` or
Expand All @@ -682,6 +702,10 @@ Creating network servers
The socket option :py:data:`~socket.TCP_NODELAY` is set by default
for all TCP connections.

.. seealso::

The :func:`start_server` function is a higher-level alternative API
@@ -691,7 +715,9 @@ Creating network servers

.. coroutinemethod:: loop.create_unix_server(protocol_factory, path=None, \
*, sock=None, backlog=100, ssl=None, \
ssl_handshake_timeout=None, start_serving=True)

Similar to :meth:`loop.create_server` but works with the
:py:data:`~socket.AF_UNIX` socket family.
Expand All @@ -711,8 +737,14 @@ Creating network servers
Added the *ssl_handshake_timeout* and *start_serving* parameters.
The *path* parameter can now be a :class:`~pathlib.Path` object.

.. coroutinemethod:: loop.connect_accepted_socket(protocol_factory, \
sock, *, ssl=None, ssl_handshake_timeout=None)

Wrap an already accepted connection into a transport/protocol pair.

Expand All @@ -734,6 +766,10 @@ Creating network servers
wait for the SSL handshake to complete before aborting the connection.
``60.0`` seconds if ``None`` (default).

Returns a ``(transport, protocol)`` pair.

.. versionadded:: 3.5.3
Expand All @@ -742,6 +778,10 @@ Creating network servers

Added the *ssl_handshake_timeout* parameter.


Transferring files
^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -778,7 +818,8 @@ TLS Upgrade

.. coroutinemethod:: loop.start_tls(transport, protocol, \
sslcontext, *, server_side=False, \
server_hostname=None, ssl_handshake_timeout=None)

Upgrade an existing transport-based connection to TLS.

Expand All @@ -804,8 +845,17 @@ TLS Upgrade
wait for the TLS handshake to complete before aborting the connection.
``60.0`` seconds if ``None`` (default).

.. versionadded:: 3.7


Watching file descriptors
^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Toggle all file notes Toggle all file annotations