Module: HTTPX::Plugins::StreamBidi::InstanceMethods
- Defined in:
- lib/httpx/plugins/stream_bidi.rb,
sig/plugins/stream_bidi.rbs
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
233 234 235 236 237 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 233 def close(selector = Selector.new) @signal.terminate selector.deregister(@signal) super end |
#deselect_connection(connection) ⇒ Object
247 248 249 250 251 252 253 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 247 def deselect_connection(connection, *) return super unless connection..stream super connection.signal = nil end |
#initialize ⇒ Object
228 229 230 231 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 228 def initialize(*) @signal = Signal.new super end |
#select_connection(connection, selector) ⇒ Object
239 240 241 242 243 244 245 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 239 def select_connection(connection, selector) return super unless connection..stream super selector.register(@signal) connection.signal = @signal end |