pub struct QuicSettings {Show 24 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 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 enable_hystart: bool,
pub enable_pacing: bool,
pub enable_expensive_packet_count_metrics: bool,
pub capture_quiche_logs: bool,
pub handshake_timeout: Option<Duration>,
pub listen_backlog: usize,
}
Expand description
QUIC configuration parameters.
Fields§
§alpn: Vec<Vec<u8>>
Configures the list of supported application protocols. Defaults to
[b"h3"]
.
enable_dgram: bool
Configures whether to enable DATAGRAM frame support. H3 connections copy this setting from the underlying QUIC connection.
Defaults to true
.
dgram_recv_max_queue_len: usize
Max queue length for received DATAGRAM frames. Defaults to 2^16
.
dgram_send_max_queue_len: usize
Max queue length for sending DATAGRAM frames. Defaults to 2^16
.
initial_max_data: u64
Sets the initial_max_data
transport parameter. Defaults to 10 MB.
initial_max_stream_data_bidi_local: u64
Sets the initial_max_stream_data_bidi_local
transport parameter.
Defaults to 1 MB.
initial_max_stream_data_bidi_remote: u64
Sets the initial_max_stream_data_bidi_remote
transport parameter.
Defaults to 1 MB.
initial_max_stream_data_uni: u64
Sets the initial_max_stream_data_uni
transport parameter.
Defaults to 1 MB.
initial_max_streams_bidi: u64
Sets the initial_max_streams_bidi
transport parameter.
Defaults to 100
.
initial_max_streams_uni: u64
Sets 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: bool
Configures whether the local endpoint supports active connection
migration. Defaults to true
(meaning disabled).
max_recv_udp_payload_size: usize
Sets the maximum incoming UDP payload size. Defaults to 1350 bytes.
max_send_udp_payload_size: usize
Sets the maximum outgoing UDP payload size. Defaults to 1350 bytes.
disable_client_ip_validation: bool
Whether 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: String
Congestion control algorithm to use.
For available values, see
CongestionControlAlgorithm
.
Defaults to cubic
.
enable_hystart: bool
Whether to use HyStart++ (only with cubic
and reno
CC). Defaults to
true
.
enable_pacing: bool
Optionally enables pacing for outgoing packets.
Note: this also requires pacing-compatible
SocketCapabilities
.
enable_expensive_packet_count_metrics: bool
Optionally 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: bool
Forwards [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: usize
The 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.
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