MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / read_exact

Method read_exact

tools/provenance-eval/run.py:126–133  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

124 stream.sendall(struct.pack(">I", len(frame)) + frame)
125
126 def read_exact(size):
127 data = bytearray()
128 while len(data) < size:
129 chunk = stream.recv(size - len(data))
130 if not chunk:
131 raise RuntimeError("owner closed connection before response")
132 data.extend(chunk)
133 return data
134
135 size = struct.unpack(">I", read_exact(4))[0]
136 if not 0 < size <= 8 * 1024 * 1024:

Callers 10

read_frameFunction · 0.80
batch_owner_rpcFunction · 0.80
deserializeMethod · 0.80
read_fromMethod · 0.80
read_fromMethod · 0.80
read_fromMethod · 0.80
read_fromMethod · 0.80
peek_section_typeMethod · 0.80
next_sectionMethod · 0.80
skip_sectionMethod · 0.80

Calls 1

extendMethod · 0.80

Tested by 1

batch_owner_rpcFunction · 0.64