Module: HTTPX::Plugins::StreamBidi::InstanceMethods
- Defined in:
- lib/httpx/plugins/stream_bidi.rb
Instance Method Summary collapse
- #close(selector = Selector.new) ⇒ Object
- #deselect_connection(connection) ⇒ Object
- #initialize ⇒ Object
- #select_connection(connection, selector) ⇒ Object
Instance Method Details
#close(selector = Selector.new) ⇒ Object
190 191 192 193 194 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 190 def close(selector = Selector.new) @signal.terminate selector.deregister(@signal) super(selector) end |
#deselect_connection(connection) ⇒ Object
202 203 204 205 206 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 202 def deselect_connection(connection, *) super connection.signal = nil end |
#initialize ⇒ Object
185 186 187 188 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 185 def initialize(*) @signal = Signal.new super end |
#select_connection(connection, selector) ⇒ Object
196 197 198 199 200 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 196 def select_connection(connection, selector) super selector.register(@signal) connection.signal = @signal end |