MCPcopy Index your code
hub / github.com/python/cpython / _SSLProtocolTransport

Class _SSLProtocolTransport

Lib/asyncio/sslproto.py:82–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80
81
82class _SSLProtocolTransport(transports._FlowControlMixin,
83 transports.Transport):
84
85 _start_tls_compatible = True
86 _sendfile_compatible = constants._SendfileMode.FALLBACK
87
88 def __init__(self, loop, ssl_protocol):
89 self._loop = loop
90 self._ssl_protocol = ssl_protocol
91 self._closed = False
92
93 def get_extra_info(self, name, default=None):
94 """Get optional transport information."""
95 return self._ssl_protocol._get_extra_info(name, default)
96
97 def set_protocol(self, protocol):
98 self._ssl_protocol._set_app_protocol(protocol)
99
100 def get_protocol(self):
101 return self._ssl_protocol._app_protocol
102
103 def is_closing(self):
104 return self._closed or self._ssl_protocol._is_transport_closing()
105
106 def close(self):
107 """Close the transport.
108
109 Buffered data will be flushed asynchronously. No more data
110 will be received. After all buffered data is flushed, the
111 protocol's connection_lost() method will (eventually) called
112 with None as its argument.
113 """
114 if not self._closed:
115 self._closed = True
116 self._ssl_protocol._start_shutdown()
117 else:
118 self._ssl_protocol = None
119
120 def __del__(self, _warnings=warnings):
121 if not self._closed:
122 self._closed = True
123 _warnings.warn(
124 "unclosed transport <asyncio._SSLProtocolTransport "
125 "object>", ResourceWarning)
126
127 def is_reading(self):
128 return not self._ssl_protocol._app_reading_paused
129
130 def pause_reading(self):
131 """Pause the receiving end.
132
133 No data will be passed to the protocol&#x27;s data_received()
134 method until resume_reading() is called.
135 """
136 self._ssl_protocol._pause_reading()
137
138 def resume_reading(self):
139 """Resume the receiving end.

Callers 1

_get_app_transportMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…