Upgrade an existing stream-based connection to TLS.
(self, sslcontext, *,
server_hostname=None,
ssl_handshake_timeout=None,
ssl_shutdown_timeout=None)
| 384 | await self._protocol._drain_helper() |
| 385 | |
| 386 | async def start_tls(self, sslcontext, *, |
| 387 | server_hostname=None, |
| 388 | ssl_handshake_timeout=None, |
| 389 | ssl_shutdown_timeout=None): |
| 390 | """Upgrade an existing stream-based connection to TLS.""" |
| 391 | server_side = self._protocol._client_connected_cb is not None |
| 392 | protocol = self._protocol |
| 393 | await self.drain() |
| 394 | new_transport = await self._loop.start_tls( # type: ignore |
| 395 | self._transport, protocol, sslcontext, |
| 396 | server_side=server_side, server_hostname=server_hostname, |
| 397 | ssl_handshake_timeout=ssl_handshake_timeout, |
| 398 | ssl_shutdown_timeout=ssl_shutdown_timeout) |
| 399 | self._transport = new_transport |
| 400 | protocol._replace_transport(new_transport) |
| 401 | |
| 402 | def __del__(self, warnings=warnings): |
| 403 | if not self._transport.is_closing(): |
nothing calls this directly
no test coverage detected