13 lines
280 B
Python
13 lines
280 B
Python
#!/usr/bin/env python3
|
|
import asyncio
|
|
import websockets
|
|
|
|
async def test():
|
|
async with websockets.connect("ws://localhost:8675") as ws:
|
|
print("Connected!")
|
|
while True:
|
|
msg = await ws.recv()
|
|
print(f"Received: {msg}")
|
|
|
|
asyncio.run(test())
|