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

Method _do_read__buffered

Lib/asyncio/sslproto.py:749–776  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

747 self._fatal_error(ex, 'Fatal error on SSL protocol')
748
749 def _do_read__buffered(self):
750 offset = 0
751 count = 1
752
753 buf = self._app_protocol_get_buffer(self._get_read_buffer_size())
754 wants = len(buf)
755
756 try:
757 count = self._sslobj.read(wants, buf)
758
759 if count > 0:
760 offset = count
761 while offset < wants:
762 count = self._sslobj.read(wants - offset, buf[offset:])
763 if count > 0:
764 offset += count
765 else:
766 break
767 else:
768 self._loop.call_soon(self._do_read)
769 except SSLAgainErrors:
770 pass
771 if offset > 0:
772 self._app_protocol_buffer_updated(offset)
773 if not count:
774 # close_notify
775 self._call_eof_received()
776 self._start_shutdown()
777
778 def _do_read__copied(self):
779 chunk = b'1'

Callers 1

_do_readMethod · 0.95

Calls 5

_get_read_buffer_sizeMethod · 0.95
_call_eof_receivedMethod · 0.95
_start_shutdownMethod · 0.95
readMethod · 0.45
call_soonMethod · 0.45

Tested by

no test coverage detected