MCPcopy Index your code
hub / github.com/python-websockets/websockets / hello

Function hello

example/legacy/unix_client.py:10–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8from websockets.legacy.client import unix_connect
9
10async def hello():
11 socket_path = os.path.join(os.path.dirname(__file__), "socket")
12 async with unix_connect(socket_path) as websocket:
13 name = input("What's your name? ")
14 await websocket.send(name)
15 print(f">>> {name}")
16
17 greeting = await websocket.recv()
18 print(f"<<< {greeting}")
19
20asyncio.run(hello())

Callers 1

unix_client.pyFile · 0.70

Calls 3

unix_connectFunction · 0.90
sendMethod · 0.45
recvMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…