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
244 def initialize(*)
245   @signal = Signal.new
246   super
247 end

Public Instance methods

close(selector = Selector.new)
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
249 def close(selector = Selector.new)
250   @signal.terminate
251   selector.deregister(@signal)
252   super(selector)
253 end
deselect_connection(connection, *)
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
263 def deselect_connection(connection, *)
264   return super unless connection.options.stream
265 
266   super
267 
268   connection.signal = nil
269 end
select_connection(connection, selector)
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
255 def select_connection(connection, selector)
256   return super unless connection.options.stream
257 
258   super
259   selector.register(@signal)
260   connection.signal = @signal
261 end