module HTTPX::Plugins::StreamBidi::InstanceMethods

  1. lib/httpx/plugins/stream_bidi.rb

Methods

Public Class

  1. new

Public Instance

  1. close
  2. deselect_connection
  3. select_connection

Public Class methods

new(*)
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
226 def initialize(*)
227   @signal = Signal.new
228   super
229 end

Public Instance methods

close(selector = Selector.new)
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
231 def close(selector = Selector.new)
232   @signal.terminate
233   selector.deregister(@signal)
234   super
235 end
deselect_connection(connection, *)
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
245 def deselect_connection(connection, *)
246   return super unless connection.options.stream
247 
248   super
249 
250   connection.signal = nil
251 end
select_connection(connection, selector)
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
237 def select_connection(connection, selector)
238   return super unless connection.options.stream
239 
240   super
241   selector.register(@signal)
242   connection.signal = @signal
243 end