nquic_transport (nquic v1.0.0)
View SourceQUIC transport parameter encoding and decoding per RFC 9000 Section 18.
Transport parameters are exchanged during the TLS handshake and configure connection behavior: flow control limits, stream limits, idle timeout, connection ID management, and more.
Summary
Functions
Decode transport parameters from binary. SenderRole identifies who sent them.
Encode transport parameters to binary for the TLS handshake.
Types
-type params() :: #transport_params{original_destination_connection_id :: nquic:connection_id() | undefined, max_idle_timeout :: non_neg_integer(), stateless_reset_token :: binary() | undefined, max_udp_payload_size :: pos_integer(), initial_max_data :: non_neg_integer(), initial_max_stream_data_bidi_local :: non_neg_integer(), initial_max_stream_data_bidi_remote :: non_neg_integer(), initial_max_stream_data_uni :: non_neg_integer(), initial_max_streams_bidi :: non_neg_integer(), initial_max_streams_uni :: non_neg_integer(), ack_delay_exponent :: 0..20, max_ack_delay :: non_neg_integer(), disable_active_migration :: boolean(), preferred_address :: nquic_transport:preferred_address() | undefined, active_connection_id_limit :: non_neg_integer(), initial_source_connection_id :: nquic:connection_id() | undefined, retry_source_connection_id :: nquic:connection_id() | undefined, version_information :: nquic_transport:version_information() | undefined, max_datagram_frame_size :: non_neg_integer() | undefined}.
-type preferred_address() :: #{ipv4 := {inet:ip4_address(), inet:port_number()}, ipv6 := {inet:ip6_address(), inet:port_number()}, cid := nquic:connection_id(), stateless_reset_token := binary()}.
-type version_information() :: #{chosen_version := non_neg_integer(), other_versions := [non_neg_integer()]}.
Functions
-spec decode(binary(), client | server) -> {ok, params()} | {error, nquic_error:any_reason()}.
Decode transport parameters from binary. SenderRole identifies who sent them.
Encode transport parameters to binary for the TLS handshake.