1 # -*- encoding: binary -*-
3 module Rainbows::TimedRead
4 G = Rainbows::G # :nodoc:
7 IO.select([self], nil, nil, G.kato)
10 # used for reading headers (respecting keepalive_timeout)
14 case rv = kgio_tryread(16384, buf)
16 return if expire && expire < Time.now
17 expire ||= Time.now + G.kato