httpx/sig/plugins/push_promise.rbs
HoneyryderChuck 48961d6c64 do not select on an http/2 connection with no ongoing comms
It was observed that, during a request done via a DoH resolve, the
resolver connection is left in the selector, despite already having
resolved the name, until the whole transfer is done. This is
inefficient, as we're not expected to use it again.

Fixed by improvinng the interest calculation of an HTTP/2 connection; if
the connection doesn't have anything to write. and there aren't  any
inflight streams nor pings, connection won't be listened on.
2021-02-21 16:09:45 +00:00

23 lines
625 B
Plaintext

module HTTPX
module Plugins
module PushPromise
def self.extra_options: (Options) -> Options
module ResponseMethods
def pushed?: () -> boolish
def mark_as_pushed!: () -> void
end
module InstanceMethods
private
def promise_headers: () -> Hash[HTTP2Next::Stream, Request]
def __on_promise_request: (Connection::HTTP2, HTTP2Next::Stream, headers_input) -> void
def __on_promise_response: (Connection::HTTP2, HTTP2Next::Stream, headers_input) -> void
end
end
type sessionPushPromise = Session & PushPromise::InstanceMethods
end
end