module HTTPX::Plugins::FiberConcurrency::HTTP2Methods

  1. lib/httpx/plugins/fiber_concurrency.rb

Methods

Public Class

  1. new

Public Instance

  1. backlog?
  2. interests
  3. no_requests_to_handle?
  4. send

Public Class methods

new(*)
[show source]
    # File lib/httpx/plugins/fiber_concurrency.rb
173 def initialize(*)
174   super
175   @contexts = Hash.new { |hs, k| hs[k] = Set.new }
176 end

Public Instance methods

backlog?()
[show source]
    # File lib/httpx/plugins/fiber_concurrency.rb
194 def backlog?
195   !no_more_requests?
196 end
interests()
[show source]
    # File lib/httpx/plugins/fiber_concurrency.rb
178 def interests
179   if @connection.state == :connected && @handshake_completed && !@contexts.key?(Fiber.current)
180     return :w unless @pings.empty?
181 
182     return
183   end
184 
185   super
186 end
no_requests_to_handle?()
[show source]
    # File lib/httpx/plugins/fiber_concurrency.rb
198 def no_requests_to_handle?
199   @streams.each_key.none?(&:current_context?)
200 end
send(request, *)
[show source]
    # File lib/httpx/plugins/fiber_concurrency.rb
188 def send(request, *)
189   add_to_context(request)
190 
191   super
192 end