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
377 def initialize(*)
378   super
379 
380   return unless @options.stream
381 
382   @write_buffer = BidiBuffer.new(@options.buffer_size)
383 end

Public Instance methods

call()
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
394 def call
395   return super unless @options.stream && (error = @signal.error)
396 
397   on_error(error)
398 end
interests()

rebuffers the +@write_buffer+ before calculating interests.

[show source]
    # File lib/httpx/plugins/stream_bidi.rb
386 def interests
387   return super unless @options.stream
388 
389   @write_buffer.rebuffer
390 
391   super
392 end