MCPcopy
hub / github.com/encode/uvicorn / websocket_receive

Method websocket_receive

tests/protocols/test_websocket.py:329–332  ·  view source on GitHub ↗
(self, message: WebSocketReceiveEvent)

Source from the content-addressed store, hash-verified

327 await self.send({"type": "websocket.accept"})
328
329 async def websocket_receive(self, message: WebSocketReceiveEvent):
330 _text = message.get("text")
331 assert _text is not None
332 await self.send({"type": "websocket.send", "text": _text})
333
334 async def send_text(url: str):
335 async with websockets.client.connect(url) as websocket:

Callers

nothing calls this directly

Calls 1

sendMethod · 0.45

Tested by

no test coverage detected