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

Method eof_received

Lib/asyncio/sslproto.py:453–486  ·  view source on GitHub ↗

Called when the other end of the low-level stream is half-closed. If this returns a false value (including None), the transport will close itself. If it returns a true value, closing the transport is up to the protocol.

(self)

Source from the content-addressed store, hash-verified

451 self._do_shutdown()
452
453 def eof_received(self):
454 """Called when the other end of the low-level stream
455 is half-closed.
456
457 If this returns a false value (including None), the transport
458 will close itself. If it returns a true value, closing the
459 transport is up to the protocol.
460 """
461 self._eof_received = True
462 try:
463 if self._loop.get_debug():
464 logger.debug("%r received EOF", self)
465
466 if self._state == SSLProtocolState.DO_HANDSHAKE:
467 self._on_handshake_complete(ConnectionResetError)
468
469 elif self._state == SSLProtocolState.WRAPPED:
470 self._set_state(SSLProtocolState.FLUSHING)
471 if self._app_reading_paused:
472 return True
473 else:
474 self._do_flush()
475
476 elif self._state == SSLProtocolState.FLUSHING:
477 self._do_write()
478 self._set_state(SSLProtocolState.SHUTDOWN)
479 self._do_shutdown()
480
481 elif self._state == SSLProtocolState.SHUTDOWN:
482 self._do_shutdown()
483
484 except Exception:
485 self._transport.close()
486 raise
487
488 def _get_extra_info(self, name, default=None):
489 if name in self._extra:

Callers 1

_call_eof_receivedMethod · 0.45

Calls 8

_set_stateMethod · 0.95
_do_flushMethod · 0.95
_do_writeMethod · 0.95
_do_shutdownMethod · 0.95
get_debugMethod · 0.45
debugMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected