code: def _net_read(sock, count, expiration):
      
      s = ''
      while count > 0:
          _wait_for_readable(sock, expiration)
          n = sock.recv(count)
          if n == '':
              raise EOFError
          count = count - len(n)
          s = s + n
      return s
docs: Read the specified number of bytes from sock.  Keep trying until we
      either get the desired amount, or we hit EOF.
      A Timeout exception will be raised if the operation is not completed
      by the expiration time.