You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
247 B
12 lines
247 B
2 years ago
|
#!/usr/bin/env python3
|
||
|
|
||
|
import asyncio
|
||
|
import websockets
|
||
|
|
||
|
async def hello():
|
||
|
async with websockets.connect('ws://localhost:8081') as websocket:
|
||
|
await websocket.send('Hello')
|
||
|
await websocket.recv()
|
||
|
|
||
|
asyncio.run(hello())
|