MCPcopy Index your code
hub / github.com/RustPython/RustPython / ClientProtoSecond

Class ClientProtoSecond

Lib/test/test_asyncio/test_ssl.py:855–869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

clientMethod · 0.70

Calls

no outgoing calls

Tested by 1

clientMethod · 0.56