MCPcopy Create free account
hub / github.com/EasyIME/PIME / __init__

Method __init__

python/python3/tornado/iostream.py:1355–1376  ·  view source on GitHub ↗

The ``ssl_options`` keyword argument may either be an `ssl.SSLContext` object or a dictionary of keywords arguments for `ssl.wrap_socket`

(self, *args: Any, **kwargs: Any)

Source from the content-addressed store, hash-verified

1353 socket = None # type: ssl.SSLSocket
1354
1355 def __init__(self, *args: Any, **kwargs: Any) -> None:
1356 """The ``ssl_options`` keyword argument may either be an
1357 `ssl.SSLContext` object or a dictionary of keywords arguments
1358 for `ssl.wrap_socket`
1359 """
1360 self._ssl_options = kwargs.pop("ssl_options", _client_ssl_defaults)
1361 super().__init__(*args, **kwargs)
1362 self._ssl_accepting = True
1363 self._handshake_reading = False
1364 self._handshake_writing = False
1365 self._server_hostname = None # type: Optional[str]
1366
1367 # If the socket is already connected, attempt to start the handshake.
1368 try:
1369 self.socket.getpeername()
1370 except socket.error:
1371 pass
1372 else:
1373 # Indirectly start the handshake, which will run on the next
1374 # IOLoop iteration and then the real IO state will be set in
1375 # _handle_events.
1376 self._add_io_state(self.io_loop.WRITE)
1377
1378 def reading(self) -> bool:
1379 return self._handshake_reading or super().reading()

Callers

nothing calls this directly

Calls 2

_add_io_stateMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected