code: def recv(self, size):
          
          while True:
              try:
                  data = self._sock.recv(size)
                  self.bytes_read += len(data)
                  return data
              except socket.error as e:
                  what = (
                      e.args[0] not in errors.socket_errors_nonblocking
                      and e.args[0] not in errors.socket_error_eintr
                  )
                  if what:
                      raise
docs: Receive message of a size from the socket.