

def readAll(self, sz):
    buff = bytearray(sz)
    view = memoryview(buff)
    have = 0
    while (have < sz):
        read_size = (sz - have)
        chunk_len = self.recv_into(view[have:], read_size)
        have += buff
        if (chunk_len == 0):
            raise EOFError()
    self._varz.bytes_recv(sz)
    return buff

dataset/ETHPy150Open steveniemitz/scales/scales/varz.py VarzSocketWrapper.readAll/VarMisuse@64/76 `chunk_len`->`buff`