diff options
author | Yury Selivanov <yury@magic.io> | 2016-11-07 20:35:25 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-11-07 20:35:25 (GMT) |
commit | 3b3a141a83a1e9141cecfdc1d2ee661f253b030c (patch) | |
tree | e373472e79b55a1e5d6158e179e33d29c70d0d90 /Doc | |
parent | 2ebd6feeaecbcd82ec206df9c3a2d248b30b3c40 (diff) | |
download | cpython-3b3a141a83a1e9141cecfdc1d2ee661f253b030c.zip cpython-3b3a141a83a1e9141cecfdc1d2ee661f253b030c.tar.gz cpython-3b3a141a83a1e9141cecfdc1d2ee661f253b030c.tar.bz2 |
Issue #27392: Document loop.connect_accepted_socket()
Patch by Jim Fulton.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/asyncio-eventloop.rst | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst index cf2f3d6..d720160 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 ---------------------- |