changeset: 104950:6811df9e9797 branch: 3.6 parent: 104947:f2858945c058 parent: 104949:3e6570231c80 user: Yury Selivanov date: Mon Nov 07 15:35:45 2016 -0500 files: Doc/library/asyncio-eventloop.rst description: Merge 3.5 (issue #27392) diff -r f2858945c058 -r 6811df9e9797 Doc/library/asyncio-eventloop.rst --- a/Doc/library/asyncio-eventloop.rst Mon Nov 07 23:36:50 2016 +0300 +++ b/Doc/library/asyncio-eventloop.rst Mon Nov 07 15:35:45 2016 -0500 @@ -462,6 +462,23 @@ 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 `. When completed, the + coroutine returns a ``(transport, protocol)`` pair. Watch file descriptors ----------------------