MCPcopy Create free account
hub / github.com/SySS-Research/hallucinate / read_bytes

Method read_bytes

hallucinate/java.py:19–23  ·  view source on GitHub ↗
(self, n)

Source from the content-addressed store, hash-verified

17class JavaAgentHandler(socketserver.BaseRequestHandler):
18
19 def read_bytes(self, n):
20 r = b''
21 while len(r) < n:
22 r += self.request.recv(n - len(r))
23 return r
24
25 def read_string(self):
26 length, = struct.unpack(">H", self.read_bytes(2))

Callers 2

read_stringMethod · 0.95
handleMethod · 0.95

Calls 1

recvMethod · 0.45

Tested by

no test coverage detected