Class: Raptor::Reactor::Http2IO
- Inherits:
-
ConnectionIO
- Object
- ConnectionIO
- Raptor::Reactor::Http2IO
- Defined in:
- lib/raptor/reactor.rb,
sig/generated/raptor/reactor.rbs
Overview
Tracks reactor-owned I/O state for an HTTP/2 connection.
Instance Attribute Summary collapse
-
#budget ⇒ DetachedBody::Budget
readonly
: DetachedBody::Budget.
-
#detached ⇒ Hash[Integer, DetachedBody]
readonly
: Hash[Integer, DetachedBody].
-
#ready ⇒ Array[Integer]
readonly
: Array.
-
#ready_streams ⇒ Hash[Integer, bool]
readonly
: Hash[Integer, bool].
Attributes inherited from ConnectionIO
#closing, #monitor, #offset, #output, #reading, #timeout, #wait
Instance Method Summary collapse
-
#empty? ⇒ Boolean
Returns whether the connection has no output or detached streams remaining.
-
#initialize ⇒ Http2IO
constructor
Creates empty I/O state for an HTTP/2 connection and its detached streams.
Constructor Details
#initialize ⇒ Http2IO
Creates empty I/O state for an HTTP/2 connection and its detached streams.
157 158 159 160 161 162 163 |
# File 'lib/raptor/reactor.rb', line 157 def initialize super @detached = {} @ready = [] @ready_streams = {} @budget = DetachedBody::Budget.new(DETACHED_CONNECTION_BUFFER_SIZE) end |
Instance Attribute Details
#budget ⇒ DetachedBody::Budget (readonly)
: DetachedBody::Budget
150 151 152 |
# File 'lib/raptor/reactor.rb', line 150 def budget @budget end |
#detached ⇒ Hash[Integer, DetachedBody] (readonly)
: Hash[Integer, DetachedBody]
147 148 149 |
# File 'lib/raptor/reactor.rb', line 147 def detached @detached end |
#ready ⇒ Array[Integer] (readonly)
: Array
148 149 150 |
# File 'lib/raptor/reactor.rb', line 148 def ready @ready end |
#ready_streams ⇒ Hash[Integer, bool] (readonly)
: Hash[Integer, bool]
149 150 151 |
# File 'lib/raptor/reactor.rb', line 149 def ready_streams @ready_streams end |
Instance Method Details
#empty? ⇒ Boolean
Returns whether the connection has no output or detached streams remaining.
170 171 172 |
# File 'lib/raptor/reactor.rb', line 170 def empty? super && detached.empty? end |