def _readall(self, size):
data = b"<STR_LIT>"<EOL>while len(data) < size:<EOL><INDENT>d = self._read(size - len(data))<EOL>if self._broken:<EOL><INDENT>raise StopIteration<EOL><DEDENT>if not d:<EOL><INDENT>time.sleep(<NUM_LIT:0>)<EOL>continue<EOL><DEDENT>data += d<EOL><DEDENT>return data<EOL>
Read until all bytes are collected.

Parameters
----------
size : int
  Number of bytes to read.