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 ⇒ Boolean
: bool.
-
#monitor ⇒ NIO::Monitor?
: NIO::Monitor?.
-
#offset ⇒ Integer
: Integer.
-
#output ⇒ Array[String]
readonly
: Array.
-
#reading ⇒ Boolean
: bool.
-
#timeout ⇒ TimeoutClient?
: TimeoutClient?.
-
#wait ⇒ Symbol?
: Symbol?.
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.
88 89 90 91 92 93 94 95 96 |
# File 'lib/raptor/reactor.rb', line 88 def initialize @output = [] @offset = 0 @wait = nil @reading = false @closing = false @monitor = nil @timeout = nil end |
Instance Attribute Details
#closing ⇒ Boolean
: bool
78 79 80 |
# File 'lib/raptor/reactor.rb', line 78 def closing @closing end |
#monitor ⇒ NIO::Monitor?
: NIO::Monitor?
79 80 81 |
# File 'lib/raptor/reactor.rb', line 79 def monitor @monitor end |
#offset ⇒ Integer
: Integer
75 76 77 |
# File 'lib/raptor/reactor.rb', line 75 def offset @offset end |
#output ⇒ Array[String] (readonly)
: Array
81 82 83 |
# File 'lib/raptor/reactor.rb', line 81 def output @output end |
#reading ⇒ Boolean
: bool
77 78 79 |
# File 'lib/raptor/reactor.rb', line 77 def reading @reading end |
#timeout ⇒ TimeoutClient?
: TimeoutClient?
80 81 82 |
# File 'lib/raptor/reactor.rb', line 80 def timeout @timeout end |
#wait ⇒ Symbol?
: Symbol?
76 77 78 |
# File 'lib/raptor/reactor.rb', line 76 def wait @wait end |
Instance Method Details
#empty? ⇒ Boolean
Returns whether the connection has no output waiting to be written.
103 104 105 |
# File 'lib/raptor/reactor.rb', line 103 def empty? output.empty? end |