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

Class ClientProtoSecond

Lib/test/test_asyncio/test_ssl.py:851–865  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

849 pass
850
851 class ClientProtoSecond(asyncio.Protocol):
852 def __init__(self, on_data, on_eof):
853 self.on_data = on_data
854 self.on_eof = on_eof
855 self.con_made_cnt = 0
856
857 def connection_made(self, tr):
858 nonlocal client_con_made_calls
859 client_con_made_calls += 1
860
861 def data_received(self, data):
862 self.on_data.set_result(data)
863
864 def eof_received(self):
865 self.on_eof.set_result(True)
866
867 async def client(addr):
868 await asyncio.sleep(0.5)

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…