Struct QuicSettings

Source
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

Source§

fn clone(&self) -> QuicSettings

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for QuicSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for QuicSettings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for QuicSettings

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for QuicSettings

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Settings for QuicSettings

Source§

fn add_docs( &self, parent_key: &[String], docs: &mut HashMap<Vec<String>, &'static [&'static str]>, )

Add Rust doc comments for the settings fields. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,