wt_h2_init (webtransport v0.2.3)
View SourceWebTransport-Init structured-field header (draft-14 §4.3.2).
The WebTransport-Init request header is an RFC 8941 Dictionary with integer values. Defined keys: u - initial max stream count for unidirectional streams opened by the recipient bl - initial max stream count for bidirectional streams opened by the sender br - initial max stream count for bidirectional streams opened by the recipient
When both HTTP/2 SETTINGS and WebTransport-Init are present, the endpoint MUST use the greater of the two values for each field.
Summary
Functions
Merge WebTransport-Init values with local defaults, taking the greater of each field (draft-14 §4.3.2).
Encode a WebTransport-Init header value. Produces an RFC 8941 Dictionary in its simplest form: key=value, ....
Parse a WebTransport-Init header value. Accepts the RFC 8941 Dictionary subset we emit: key=integer, ....
Types
-type init_params() :: #{u => non_neg_integer(), bl => non_neg_integer(), br => non_neg_integer()}.
Functions
-spec apply_greater_of(init_params(), init_params()) -> init_params().
Merge WebTransport-Init values with local defaults, taking the greater of each field (draft-14 §4.3.2).
-spec encode(init_params()) -> binary().
Encode a WebTransport-Init header value. Produces an RFC 8941 Dictionary in its simplest form: key=value, ....
-spec parse(binary()) -> {ok, init_params()} | {error, term()}.
Parse a WebTransport-Init header value. Accepts the RFC 8941 Dictionary subset we emit: key=integer, ....