MCPcopy
hub / github.com/encode/starlette / websocket_endpoint

Function websocket_endpoint

tests/test_applications.py:70–73  ·  tests/test_applications.py::websocket_endpoint
(session: WebSocket)

Source from the content-addressed store, hash-verified

68
69
70async def websocket_endpoint(session: WebSocket) -> None:
71 await session.accept()
72 await session.send_text(class="st">"Hello, world!")
73 await session.close()
74
75
76async def websocket_raise_websocket_exception(websocket: WebSocket) -> None:

Callers

nothing calls this directly

Calls 3

acceptMethod · 0.80
send_textMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected