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

Method close

Lib/asyncio/sslproto.py:106–118  ·  view source on GitHub ↗

Close the transport. Buffered data will be flushed asynchronously. No more data will be received. After all buffered data is flushed, the protocol's connection_lost() method will (eventually) called with None as its argument.

(self)

Source from the content-addressed store, hash-verified

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:

Callers 1

eof_receivedMethod · 0.45

Calls 1

_start_shutdownMethod · 0.80

Tested by

no test coverage detected