15 lines
313 B
Python
15 lines
313 B
Python
|
import asyncio
|
||
|
import websockets
|
||
|
|
||
|
socket_connections = {}
|
||
|
|
||
|
|
||
|
async def main():
|
||
|
async with websockets.connect("ws://10.0.0.29:8765") as websocket:
|
||
|
while 1:
|
||
|
await websocket.send("Hellow world")
|
||
|
print("sent")
|
||
|
|
||
|
await asyncio.sleep(0.5)
|
||
|
|
||
|
asyncio.run(main())
|