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

Function reader

tests/test_websockets.py:216–219  ·  tests/test_websockets.py::reader
(websocket: WebSocket)

Source from the content-addressed store, hash-verified

214 stream_send, stream_receive = anyio.create_memory_object_stream()
215
216 async def reader(websocket: WebSocket) -> None:
217 async with stream_send:
218 async for data in websocket.iter_json():
219 await stream_send.send(data)
220
221 async def writer(websocket: WebSocket) -> None:
222 async with stream_receive:

Callers

nothing calls this directly

Calls 2

iter_jsonMethod · 0.80
sendMethod · 0.45

Tested by

no test coverage detected