Answers for "PY | websocket - client"

0

PY | websocket - client

#!/usr/bin/env python

import asyncio
import websockets

async def hello(uri):
    async with websockets.connect(uri) as websocket:
        await websocket.send("Hello world!")
        await websocket.recv()

asyncio.get_event_loop().run_until_complete(
    hello('ws://localhost:8765'))
Posted by: Guest on October-25-2021

Code answers related to "PY | websocket - client"

Python Answers by Framework

Browse Popular Code Answers by Language