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
-
#signal ⇒ Object
writeonly
Sets the attribute signal.
Instance Method Summary collapse
- #call ⇒ Object
- #initialize ⇒ Object
-
#interests ⇒ Object
rebuffers the @write_buffer before calculating interests.
Instance Attribute Details
#signal=(value) ⇒ Object (writeonly)
Sets the attribute signal
292 293 294 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 292 def signal=(value) @signal = value end |
Instance Method Details
#call ⇒ Object
306 307 308 309 310 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 306 def call return super unless (error = @signal.error) on_error(error) end |
#initialize ⇒ Object
294 295 296 297 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 294 def initialize(*) super @write_buffer = BidiBuffer.new(@options.buffer_size) end |
#interests ⇒ Object
rebuffers the @write_buffer before calculating interests.
300 301 302 303 304 |
# File 'lib/httpx/plugins/stream_bidi.rb', line 300 def interests @write_buffer.rebuffer super end |