def readpartial(maxlen, outbuf = nil)
      return socket.read_nonblock(maxlen, outbuf)
    rescue Errno::EWOULDBLOCK, Errno::EAGAIN, Errno::ECONNRESET
      if wait_readable(read_timeout)
        retry
      else
        raise Timeout, "Could not read from #{host}:#{port} in #{read_timeout} seconds"
      end
    end
def readpartial(maxlen, outbuf = nil)
      return socket.read_nonblock(maxlen, outbuf)
    rescue Errno::EWOULDBLOCK, Errno::EAGAIN, Errno::ECONNRESET
      if wait_readable(read_timeout)
        retry
      else
        raise Timeout, "Could not read from #{host}:#{port} in #{read_timeout} seconds"
      end
    end
Internal: Read up to a maxlen of data from the socket and store it in outbuf

 maxlen - the maximum number of bytes to read from the socket
 outbuf - the buffer in which to store the bytes.

 Returns the bytes read