#2 ✓resolved
bahuvrihi

Monitoring HTTP

Reported by bahuvrihi | November 24th, 2008 @ 04:08 PM

This is a snippet I pulled from tap-http. It is from an older library, Prosperity. Basically this shows where to hook into the Net::BufferedIO to monitor the progress of an HTTP request that sends updates.

Ignore the Acts::Monitorable and observe where its tick_monitor method is used.


module Net
  class HTTP
    attr_reader :socket
  end

  class BufferedIO
    include Prosperity::Acts::Monitorable

    private

    def rbuf_fill
      tick_monitor
      timeout(@read_timeout) {
        @rbuf << @io.sysread(1024)
      }
    end
  end
end

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Referenced by

Pages