MCPcopy Create free account
hub / github.com/encode/starlette / __call__

Method __call__

tests/test_routing.py:359–363  ·  view source on GitHub ↗
(self, scope: Scope, receive: Receive, send: Send)

Source from the content-addressed store, hash-verified

357
358class WebSocketEndpoint:
359 async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
360 websocket = WebSocket(scope=scope, receive=receive, send=send)
361 await websocket.accept()
362 await websocket.send_json({"URL": str(websocket.url_for("websocket_endpoint"))})
363 await websocket.close()
364
365
366mixed_protocol_app = Router(

Callers

nothing calls this directly

Calls 5

acceptMethod · 0.95
send_jsonMethod · 0.95
closeMethod · 0.95
WebSocketClass · 0.90
url_forMethod · 0.45

Tested by

no test coverage detected