httpx/sig/altsvc.rbs
HoneyryderChuck cce68bcd98 moved altsvc-specific connection behaviour to mixin
this mixin applies only for connections built via Session#build_altsvc_connection. This moves out logic which was always being called on the hot path for connections which hadn't been alt-svc enabled, which improves the Connection#match? bottleneck.
2023-11-19 22:38:25 +00:00

33 lines
1.1 KiB
Plaintext

module HTTPX
module AltSvc
module ConnectionMixin
def send: (Request request) -> void
def match?: (URI::Generic uri, Options options) -> bool
private
def match_altsvcs?: (URI::Generic uri) -> bool
def match_altsvc_options?: (URI::Generic uri, Options options) -> bool
end
type altsvc_params = Hash[String, untyped]
def self?.cached_altsvc: (String origin) -> Array[altsvc_params]
def self?.cached_altsvc_set: (String origin, altsvc_params) -> void
def self?.lookup: (String origin, Integer | Float ttl) -> Array[altsvc_params]
def self?.emit: (Request request, response response) { (http_uri alt_origin, String origin, altsvc_params alt_params) -> void } -> void
def self?.parse: (String altsvc) { (http_uri alt_origin, altsvc_params alt_params) -> void } -> void
| (String altsvc) -> Enumerable[[http_uri, altsvc_params]]
def self?.parse_altsvc_scheme: (String alt_proto) -> String?
def self.parse_altsvc_origin: (string alt_proto, String alt_origin) -> http_uri?
end
end