#[non_exhaustive]pub struct QuicSettings {Show 41 fields
pub alpn: Vec<Vec<u8>>,
pub enable_dgram: bool,
pub dgram_recv_max_queue_len: usize,
pub dgram_send_max_queue_len: usize,
pub initial_max_data: u64,
pub initial_max_stream_data_bidi_local: u64,
pub initial_max_stream_data_bidi_remote: u64,
pub initial_max_stream_data_uni: u64,
pub initial_max_streams_bidi: u64,
pub initial_max_streams_uni: u64,
pub max_idle_timeout: Option<Duration>,
pub disable_active_migration: bool,
pub active_connection_id_limit: u64,
pub max_recv_udp_payload_size: usize,
pub max_send_udp_payload_size: usize,
pub disable_client_ip_validation: bool,
pub keylog_file: Option<String>,
pub qlog_dir: Option<String>,
pub cc_algorithm: String,
pub initial_congestion_window_packets: usize,
pub enable_relaxed_loss_threshold: bool,
pub discover_path_mtu: bool,
pub enable_hystart: bool,
pub enable_pacing: bool,
pub max_pacing_rate: Option<u64>,
pub enable_expensive_packet_count_metrics: bool,
pub capture_quiche_logs: bool,
pub handshake_timeout: Option<Duration>,
pub listen_backlog: usize,
pub verify_peer: bool,
pub max_connection_window: u64,
pub max_stream_window: u64,
pub grease: bool,
pub max_amplification_factor: usize,
pub send_capacity_factor: f64,
pub ack_delay_exponent: u64,
pub max_ack_delay: u64,
pub max_path_challenge_recv_queue_len: usize,
pub stateless_reset_token: Option<u128>,
pub disable_dcid_reuse: bool,
pub track_unknown_transport_parameters: Option<usize>,
}Expand description
QUIC configuration parameters.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.alpn: Vec<Vec<u8>>Configures the list of supported application protocols.
Defaults to [b"h3"].
enable_dgram: boolConfigures whether to enable DATAGRAM frame support. H3 connections copy this setting from the underlying QUIC connection.
Defaults to true.
dgram_recv_max_queue_len: usizeMax queue length for received DATAGRAM frames.
Defaults to 2^16.
dgram_send_max_queue_len: usizeMax queue length for sending DATAGRAM frames.
Defaults to 2^16.
initial_max_data: u64Sets the initial_max_data transport parameter.
Defaults to 10 MB.
initial_max_stream_data_bidi_local: u64Sets the initial_max_stream_data_bidi_local transport parameter.
Defaults to 1 MB.
initial_max_stream_data_bidi_remote: u64Sets the initial_max_stream_data_bidi_remote transport parameter.
Defaults to 1 MB.
initial_max_stream_data_uni: u64Sets the initial_max_stream_data_uni transport parameter.
Defaults to 1 MB.
initial_max_streams_bidi: u64Sets the initial_max_streams_bidi transport parameter.
Defaults to 100.
initial_max_streams_uni: u64Sets the initial_max_streams_uni transport parameter.
Defaults to 100.
max_idle_timeout: Option<Duration>Configures the max idle timeout of the connection in milliseconds. The
real idle timeout is the minimum of this and the peer’s
max_idle_timeout.
Defaults to 56 seconds.
disable_active_migration: boolConfigures whether the local endpoint supports active connection migration.
Defaults to true (meaning disabled).
active_connection_id_limit: u64Sets the active_connection_id_limit transport parameter.
Defaults to 2. Note that values less than 2 will be ignored.
max_recv_udp_payload_size: usizeSets the maximum incoming UDP payload size.
Defaults to 1350 bytes.
max_send_udp_payload_size: usizeSets the maximum outgoing UDP payload size.
Defaults to 1350 bytes.
disable_client_ip_validation: boolWhether to validate client IPs in QUIC initials.
If set to true, any received QUIC initial will immediately spawn a
connection and start crypto operations for the handshake. Otherwise,
the client is asked to execute a stateless retry first (the default).
keylog_file: Option<String>Path to a file in which TLS secrets will be logged in SSLKEYLOGFILE format.
qlog_dir: Option<String>Path to a directory where QLOG files will be saved.
cc_algorithm: StringCongestion control algorithm to use.
For available values, see
CongestionControlAlgorithm.
Defaults to cubic.
initial_congestion_window_packets: usizeThe default initial congestion window size in terms of packet count.
Defaults to 10.
enable_relaxed_loss_threshold: boolConfigures whether to enable relaxed loss detection on spurious loss.
Defaults to false.
discover_path_mtu: boolConfigures whether to do path MTU discovery.
Defaults to false.
enable_hystart: boolWhether to use HyStart++ (only with cubic and reno CC).
Defaults to true.
enable_pacing: boolOptionally enables pacing for outgoing packets.
Note: this also requires pacing-compatible
SocketCapabilities.
max_pacing_rate: Option<u64>Sets the max value for pacing rate.
By default, there is no limit.
enable_expensive_packet_count_metrics: boolOptionally enables expensive versions of the
accepted_initial_quic_packet_count
and rejected_initial_quic_packet_count metrics.
The expensive versions add a label for the peer IP subnet (/24 for
IPv4, /32 for IPv6). They thus generate many more time series if
peers are arbitrary eyeballs from the global Internet.
capture_quiche_logs: boolForwards quiche logs into the logging system currently used by
[foundations].
Defaults to false.
§Warning
This should only be used for local debugging. quiche can emit lots
(and lots, and lots) of logs (the TRACE level emits a log record for
every packet and frame) and you can very easily overwhelm your
logging pipeline.
handshake_timeout: Option<Duration>A timeout for the QUIC handshake, in milliseconds.
Disabled by default.
listen_backlog: usizeThe maximum number of newly-created connections that will be queued for the application to receive. Not applicable to client-side usage.
Defaults to 1024 connections.
verify_peer: boolWhether or not to verify the peer’s certificate.
Defaults to false, meaning no peer verification is performed. Note
that clients should usually set this value to true - see
verify_peer() for more.
max_connection_window: u64The maximum size of the receiver connection flow control window.
Defaults to 24MB.
max_stream_window: u64The maximum size of the receiveer stream flow control window.
Defaults to 16MB.
grease: boolConfigures whether to send GREASE values.
Defaults to true.
max_amplification_factor: usizeSets the anti-amplification limit factor.
Defaults to 3.
send_capacity_factor: f64Sets the send capacity factor.
A factor greater than 1 allows the connection to buffer more outbound data than can be sent at this moment. This can improve throughput by reducing time spent waiting for new data.
Defaults to 1.
ack_delay_exponent: u64Sets the ack_delay_exponent transport parameter.
Defaults to 3.
max_ack_delay: u64Sets the max_ack_delay transport parameter.
Defaults to 25.
max_path_challenge_recv_queue_len: usizeConfigures the max number of queued received PATH_CHALLENGE frames.
Defaults to 3.
stateless_reset_token: Option<u128>Sets the initial stateless reset token.
Note that this applies only to server-side connections - on client-side connections, this is a no-op.
Defaults to None.
disable_dcid_reuse: boolSets whether the QUIC connection should avoid reusing DCIDs over different paths.
Defaults to false. See set_disable_dcid_reuse() for more.
track_unknown_transport_parameters: Option<usize>Specifies the number of bytes used to track unknown transport parameters.
Defaults to None, e.g., unknown transport parameters will not be
tracked. See enable_track_unknown_transport_parameters() for
more.
Trait Implementations§
Source§impl Clone for QuicSettings
impl Clone for QuicSettings
Source§fn clone(&self) -> QuicSettings
fn clone(&self) -> QuicSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QuicSettings
impl Debug for QuicSettings
Source§impl Default for QuicSettings
impl Default for QuicSettings
Source§impl<'de> Deserialize<'de> for QuicSettingswhere
QuicSettings: Default,
impl<'de> Deserialize<'de> for QuicSettingswhere
QuicSettings: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for QuicSettings
impl Serialize for QuicSettings
Auto Trait Implementations§
impl Freeze for QuicSettings
impl RefUnwindSafe for QuicSettings
impl Send for QuicSettings
impl Sync for QuicSettings
impl Unpin for QuicSettings
impl UnwindSafe for QuicSettings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more