(
self, protocol_factory, sock,
*, ssl=None,
ssl_handshake_timeout=None,
ssl_shutdown_timeout=None)
| 1677 | return server |
| 1678 | |
| 1679 | async def connect_accepted_socket( |
| 1680 | self, protocol_factory, sock, |
| 1681 | *, ssl=None, |
| 1682 | ssl_handshake_timeout=None, |
| 1683 | ssl_shutdown_timeout=None): |
| 1684 | if sock.type != socket.SOCK_STREAM: |
| 1685 | raise ValueError(f'A Stream Socket was expected, got {sock!r}') |
| 1686 | |
| 1687 | if ssl_handshake_timeout is not None and not ssl: |
| 1688 | raise ValueError( |
| 1689 | 'ssl_handshake_timeout is only meaningful with ssl') |
| 1690 | |
| 1691 | if ssl_shutdown_timeout is not None and not ssl: |
| 1692 | raise ValueError( |
| 1693 | 'ssl_shutdown_timeout is only meaningful with ssl') |
| 1694 | |
| 1695 | _check_ssl_socket(sock) |
| 1696 | |
| 1697 | transport, protocol = await self._create_connection_transport( |
| 1698 | sock, protocol_factory, ssl, '', server_side=True, |
| 1699 | ssl_handshake_timeout=ssl_handshake_timeout, |
| 1700 | ssl_shutdown_timeout=ssl_shutdown_timeout) |
| 1701 | if self._debug: |
| 1702 | # Get the socket from the transport because SSL transport closes |
| 1703 | # the old socket and creates a new SSL socket |
| 1704 | sock = transport.get_extra_info('socket') |
| 1705 | logger.debug("%r handled: (%r, %r)", sock, transport, protocol) |
| 1706 | return transport, protocol |
| 1707 | |
| 1708 | async def connect_read_pipe(self, protocol_factory, pipe): |
| 1709 | protocol = protocol_factory() |
nothing calls this directly
no test coverage detected