summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Doc/library/asyncio-eventloop.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
index cf2f3d630c..d7201601c5 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -461,6 +461,23 @@ Creating listening connections
Availability: UNIX.
+.. coroutinemethod:: BaseEventLoop.connect_accepted_socket(protocol_factory, sock, \*, ssl=None)
+
+ Handle an accepted connection.
+
+ This is used by servers that accept connections outside of
+ asyncio but that use asyncio to handle them.
+
+ Parameters:
+
+ * *sock* is a preexisting socket object returned from an ``accept``
+ call.
+
+ * *ssl* can be set to an :class:`~ssl.SSLContext` to enable SSL over the
+ accepted connections.
+
+ This method is a :ref:`coroutine <coroutine>`. When completed, the
+ coroutine returns a ``(transport, protocol)`` pair.
Watch file descriptors
----------------------