| 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) |