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 ⇒ Object
readonly
Returns the value of attribute budget.
-
#detached ⇒ Object
readonly
Returns the value of attribute detached.
-
#ready ⇒ Object
readonly
Returns the value of attribute ready.
-
#ready_streams ⇒ Object
readonly
Returns the value of attribute ready_streams.
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.
178 179 180 181 182 183 184 |
# File 'lib/raptor/reactor.rb', line 178 def initialize super @detached = {} @ready = [] @ready_streams = {} @budget = DetachedBody::Budget.new(DETACHED_CONNECTION_BUFFER_SIZE) end |
Instance Attribute Details
#budget ⇒ Object (readonly)
Returns the value of attribute budget.
171 172 173 |
# File 'lib/raptor/reactor.rb', line 171 def budget @budget end |
#detached ⇒ Object (readonly)
Returns the value of attribute detached.
162 163 164 |
# File 'lib/raptor/reactor.rb', line 162 def detached @detached end |
#ready ⇒ Object (readonly)
Returns the value of attribute ready.
165 166 167 |
# File 'lib/raptor/reactor.rb', line 165 def ready @ready end |
#ready_streams ⇒ Object (readonly)
Returns the value of attribute ready_streams.
168 169 170 |
# File 'lib/raptor/reactor.rb', line 168 def ready_streams @ready_streams end |
Instance Method Details
#empty? ⇒ Boolean
Returns whether the connection has no output or detached streams remaining.
191 192 193 |
# File 'lib/raptor/reactor.rb', line 191 def empty? super && detached.empty? end |