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
182 183 184 185 186 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 182 def close(selector = Selector.new) @signal.terminate selector.deregister(@signal) super(selector) end |
#deselect_connection(connection) ⇒ Object
194 195 196 197 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 194 def deselect_connection(connection, *) super connection.signal = nil end |
#initialize ⇒ Object
177 178 179 180 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 177 def initialize(*) @signal = Signal.new super end |
#select_connection(connection, selector) ⇒ Object
188 189 190 191 192 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 188 def select_connection(connection, selector) super selector.register(@signal) connection.signal = @signal end |