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