13 lines
312 B
Python
13 lines
312 B
Python
import asyncio
|
|
import time
|
|
import websockets
|
|
|
|
async def main():
|
|
async with websockets.connect('ws://localhost:8010') as ws:
|
|
while True:
|
|
await ws.send("testsage")
|
|
server_message = ws.recv()
|
|
print(server_message)
|
|
|
|
|
|
asyncio.get_event_loop().run_until_complete(main()) |