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

Class ClientProtoSecond

Lib/test/test_asyncio/test_sslproto.py:458–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

456 slf.on_data.set_result(bytes(slf.buf[:nsize]))
457
458 class ClientProtoSecond(asyncio.Protocol):
459 def __init__(self, on_data, on_eof):
460 self.on_data = on_data
461 self.on_eof = on_eof
462 self.con_made_cnt = 0
463
464 def connection_made(self, tr):
465 nonlocal client_con_made_calls
466 client_con_made_calls += 1
467
468 def data_received(self, data):
469 self.on_data.set_result(data)
470
471 def eof_received(self):
472 self.on_eof.set_result(True)
473
474 async def client(addr):
475 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…