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
220 def initialize(*)
221   @signal = Signal.new
222   super
223 end

Public Instance methods

close(selector = Selector.new)
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
225 def close(selector = Selector.new)
226   @signal.terminate
227   selector.deregister(@signal)
228   super
229 end
deselect_connection(connection, *)
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
239 def deselect_connection(connection, *)
240   return super unless connection.options.stream
241 
242   super
243 
244   connection.signal = nil
245 end
select_connection(connection, selector)
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
231 def select_connection(connection, selector)
232   return super unless connection.options.stream
233 
234   super
235   selector.register(@signal)
236   connection.signal = @signal
237 end