module HTTPX::Plugins::StreamBidi::ConnectionMethods

  1. lib/httpx/plugins/stream_bidi.rb

overrides the declaration of +@write_buffer+, which is now a thread-safe buffer responding to the same API.

Methods

Public Class

  1. new

Public Instance

  1. call
  2. interests
  3. signal

Attributes

signal [W]

Public Class methods

new(*)
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
371 def initialize(*)
372   super
373 
374   return unless @options.stream
375 
376   @write_buffer = BidiBuffer.new(@options.buffer_size)
377 end

Public Instance methods

call()
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
388 def call
389   return super unless @options.stream && (error = @signal.error)
390 
391   on_error(error)
392 end
interests()

rebuffers the +@write_buffer+ before calculating interests.

[show source]
    # File lib/httpx/plugins/stream_bidi.rb
380 def interests
381   return super unless @options.stream
382 
383   @write_buffer.rebuffer
384 
385   super
386 end