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

Function receive_all

tests/protocols/test_http.py:933–940  ·  view source on GitHub ↗
(sock: socket.socket)

Source from the content-addressed store, hash-verified

931@skip_if_no_httptools
932def test_fragmentation(unused_tcp_port: int):
933 def receive_all(sock: socket.socket):
934 chunks: list[bytes] = []
935 while True:
936 chunk = sock.recv(1024)
937 if not chunk:
938 break
939 chunks.append(chunk)
940 return b"".join(chunks)
941
942 app = Response("Hello, world", media_type="text/plain")
943

Callers 1

send_fragmented_reqFunction · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected