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

Function hello

example/legacy/unix_server.py:10–17  ·  view source on GitHub ↗
(websocket)

Source from the content-addressed store, hash-verified

8from websockets.legacy.server import unix_serve
9
10async def hello(websocket):
11 name = await websocket.recv()
12 print(f"<<< {name}")
13
14 greeting = f"Hello {name}!"
15
16 await websocket.send(greeting)
17 print(f">>> {greeting}")
18
19async def main():
20 socket_path = os.path.join(os.path.dirname(__file__), "socket")

Callers

nothing calls this directly

Calls 2

recvMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…