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
225 226 227 228 229 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 225 def close(selector = Selector.new) @signal.terminate selector.deregister(@signal) super end |
#deselect_connection(connection) ⇒ Object
239 240 241 242 243 244 245 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 239 def deselect_connection(connection, *) return super unless connection..stream super connection.signal = nil end |
#initialize ⇒ Object
220 221 222 223 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 220 def initialize(*) @signal = Signal.new super end |
#select_connection(connection, selector) ⇒ Object
231 232 233 234 235 236 237 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 231 def select_connection(connection, selector) return super unless connection..stream super selector.register(@signal) connection.signal = @signal end |