Полная синхронизация
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#!/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())
|
||||
Reference in New Issue
Block a user