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

Function hello

example/quick/server.py:7–14  ·  view source on GitHub ↗
(websocket)

Source from the content-addressed store, hash-verified

5from websockets.asyncio.server import serve
6
7async def hello(websocket):
8 name = await websocket.recv()
9 print(f"<<< {name}")
10
11 greeting = f"Hello {name}!"
12
13 await websocket.send(greeting)
14 print(f">>> {greeting}")
15
16async def main():
17 async with serve(hello, "localhost", 8765) as server:

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…