()
| 4 | |
| 5 | |
| 6 | async def main(): |
| 7 | async with socketio.AsyncSimpleClient() as sio: |
| 8 | await sio.connect('http://localhost:5000') |
| 9 | while True: |
| 10 | start_timer = time.time() |
| 11 | await sio.emit('ping_from_client') |
| 12 | while (await sio.receive()) != ['pong_from_server']: |
| 13 | pass |
| 14 | latency = time.time() - start_timer |
| 15 | print(f'latency is {latency * 1000:.2f} ms') |
| 16 | |
| 17 | await asyncio.sleep(1) |
| 18 | |
| 19 | |
| 20 | if __name__ == '__main__': |
no test coverage detected
searching dependent graphs…