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
343 def initialize(*)
344   super
345 
346   return unless @options.stream
347 
348   @write_buffer = BidiBuffer.new(@options.buffer_size)
349 end

Public Instance methods

call()
[show source]
    # File lib/httpx/plugins/stream_bidi.rb
360 def call
361   return super unless @options.stream && (error = @signal.error)
362 
363   on_error(error)
364 end
interests()

rebuffers the +@write_buffer+ before calculating interests.

[show source]
    # File lib/httpx/plugins/stream_bidi.rb
352 def interests
353   return super unless @options.stream
354 
355   @write_buffer.rebuffer
356 
357   super
358 end