reso-execution/ws.py

14 lines
364 B
Python
Raw Normal View History

2024-03-17 07:22:56 +00:00
import asyncio
import websockets
async def test_link():
async with websockets.connect('ws://localhost:5000/') as websocket:
for i in range(50):
print(f"Sending message {i}")
await websocket.send("SCRAM")
asyncio.get_event_loop().run_until_complete(test_link())
asyncio.get_event_loop().run_forever()