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

Class ClientProtoFirst

Lib/test/test_asyncio/test_ssl.py:832–849  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

830 sock.close()
831
832 class ClientProtoFirst(asyncio.BufferedProtocol):
833 def __init__(self, on_data):
834 self.on_data = on_data
835 self.buf = bytearray(1)
836
837 def connection_made(self, tr):
838 nonlocal client_con_made_calls
839 client_con_made_calls += 1
840
841 def get_buffer(self, sizehint):
842 return self.buf
843
844 def buffer_updated(self, nsize):
845 assert nsize == 1
846 self.on_data.set_result(bytes(self.buf[:nsize]))
847
848 def eof_received(self):
849 pass
850
851 class ClientProtoSecond(asyncio.Protocol):
852 def __init__(self, on_data, on_eof):

Callers 1

clientMethod · 0.70

Calls

no outgoing calls

Tested by 1

clientMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…