MCPcopy
hub / github.com/gpustack/gpustack / read_until_crlf

Method read_until_crlf

tests/websocket_proxy/test_proxy_server.py:596–604  ·  view source on GitHub ↗

Read from buffer or socket until we have a complete line ending with CRLF.

()

Source from the content-addressed store, hash-verified

594 buffer = body_data # Use buffer to track unprocessed data
595
596 async def read_until_crlf():
597 """Read from buffer or socket until we have a complete line ending with CRLF."""
598 nonlocal buffer
599 while b"\r\n" not in buffer:
600 c = await reader.read(1)
601 if not c:
602 return False # EOF
603 buffer += c
604 return True
605
606 while True:
607 logger.debug(f"[Test Server] Buffer: {buffer!r}")

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected