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

Function server

example/faq/shutdown_server.py:12–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10 ...
11
12async def server():
13 async with serve(handler, "localhost", 8765) as server:
14 # Close the server when receiving SIGTERM.
15 loop = asyncio.get_running_loop()
16 loop.add_signal_handler(signal.SIGTERM, server.close)
17 await server.wait_closed()
18
19asyncio.run(server())

Callers 1

shutdown_server.pyFile · 0.70

Calls 2

serveFunction · 0.90
wait_closedMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…