Class: Raptor::Reactor::ConnectionIO
- Inherits:
-
Object
- Object
- Raptor::Reactor::ConnectionIO
- Defined in:
- lib/raptor/reactor.rb,
sig/generated/raptor/reactor.rbs
Overview
Tracks reactor-owned output state for a connection.
Instance Attribute Summary collapse
-
#closing ⇒ Object
Returns the value of attribute closing.
-
#monitor ⇒ Object
Returns the value of attribute monitor.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#reading ⇒ Object
Returns the value of attribute reading.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#wait ⇒ Object
Returns the value of attribute wait.
Instance Method Summary collapse
-
#empty? ⇒ Boolean
Returns whether the connection has no output waiting to be written.
-
#initialize ⇒ ConnectionIO
constructor
Creates empty connection I/O state for reactor-owned writes.
Constructor Details
#initialize ⇒ ConnectionIO
Creates empty connection I/O state for reactor-owned writes.
93 94 95 96 97 98 99 100 101 |
# File 'lib/raptor/reactor.rb', line 93 def initialize @output = [] @offset = 0 @wait = nil @reading = false @closing = false @monitor = nil @timeout = nil end |
Instance Attribute Details
#closing ⇒ Object
Returns the value of attribute closing.
77 78 79 |
# File 'lib/raptor/reactor.rb', line 77 def closing @closing end |
#monitor ⇒ Object
Returns the value of attribute monitor.
80 81 82 |
# File 'lib/raptor/reactor.rb', line 80 def monitor @monitor end |
#offset ⇒ Object
Returns the value of attribute offset.
68 69 70 |
# File 'lib/raptor/reactor.rb', line 68 def offset @offset end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
86 87 88 |
# File 'lib/raptor/reactor.rb', line 86 def output @output end |
#reading ⇒ Object
Returns the value of attribute reading.
74 75 76 |
# File 'lib/raptor/reactor.rb', line 74 def reading @reading end |
#timeout ⇒ Object
Returns the value of attribute timeout.
83 84 85 |
# File 'lib/raptor/reactor.rb', line 83 def timeout @timeout end |
#wait ⇒ Object
Returns the value of attribute wait.
71 72 73 |
# File 'lib/raptor/reactor.rb', line 71 def wait @wait end |
Instance Method Details
#empty? ⇒ Boolean
Returns whether the connection has no output waiting to be written.
108 109 110 |
# File 'lib/raptor/reactor.rb', line 108 def empty? output.empty? end |