'Read, blocking until size bytes are read.'

def read(self, size):

    buf_len = self._buf_len()
    if (buf_len >= size):
        return self._rbuf.read(size)
    buf_data = self._rbuf.read()
    self._rbuf = BytesIO()
    return (buf_data + self._read(self.read_all, (size - buf_len)))
