Module: HTTPX::Plugins::StreamBidi::ConnectionMethods

Defined in:
lib/httpx/plugins/stream_bidi.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#signal=(value) ⇒ Object (writeonly)

Sets the attribute signal

Parameters:

  • value

    the value to set the attribute signal to.


283
284
285
# File 'lib/httpx/plugins/stream_bidi.rb', line 283

def signal=(value)
  @signal = value
end

Instance Method Details

#initializeObject


285
286
287
288
# File 'lib/httpx/plugins/stream_bidi.rb', line 285

def initialize(*)
  super
  @write_buffer = BidiBuffer.new(@options.buffer_size)
end

#interestsObject

rebuffers the @write_buffer before calculating interests.


291
292
293
294
295
# File 'lib/httpx/plugins/stream_bidi.rb', line 291

def interests
  @write_buffer.rebuffer

  super
end