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

Method _do_read__copied

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

Source from the content-addressed store, hash-verified

776 self._start_shutdown()
777
778 def _do_read__copied(self):
779 chunk = b'1'
780 zero = True
781 one = False
782
783 try:
784 while True:
785 chunk = self._sslobj.read(self.max_size)
786 if not chunk:
787 break
788 if zero:
789 zero = False
790 one = True
791 first = chunk
792 elif one:
793 one = False
794 data = [first, chunk]
795 else:
796 data.append(chunk)
797 except SSLAgainErrors:
798 pass
799 if one:
800 self._app_protocol.data_received(first)
801 elif not zero:
802 self._app_protocol.data_received(b''.join(data))
803 if not chunk:
804 # close_notify
805 self._call_eof_received()
806 self._start_shutdown()
807
808 def _call_eof_received(self):
809 try:

Callers 1

_do_readMethod · 0.95

Calls 6

_call_eof_receivedMethod · 0.95
_start_shutdownMethod · 0.95
readMethod · 0.45
appendMethod · 0.45
data_receivedMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected