Skip to content

lwzm/websockets-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

websockets-assistant

How to use it

from websockets_assistant import client, run, sleep

async def hello(ws):
    await ws.send("hello")
    await sleep(1)
    await ws.send("websocket")
    await sleep(0.1)
    await ws.close()

# test 1
async def main():
    await asyncio.gather(
        client("wss://echo.websocket.org/", log, hello, True),
        client("wss://echo.websocket.org/", log, hello, True),
        client("wss://echo.websocket.org/", log, hello, True),
    )
run(main)

# test 2
def main():
    client("wss://echo.websocket.org/", log, hello, True),
    client("wss://echo.websocket.org/", log, hello, True),
run(main)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages