[−][src]Struct quinn::Config
Parameters governing the core QUIC state machine
This should be tuned to suit the application. In particular, window sizes for streams, stream data, and overall connection data should be set differently depending on the expected round trip time, link capacity, memory availability, and rate of stream creation. The default configuration is tuned for a 100Mbps link with a 100ms round trip time, with remote endpoints opening at most 320 new streams per second. Applications which do not require remotely-initiated streams should set the stream windows to zero.
Fields
stream_window_bidi: u64
Maximum number of bidirectional streams that may be initiated by the peer but not yet accepted locally
Must be nonzero for the peer to open any bidirectional streams.
Any number of streams may be in flight concurrently. However, to ensure predictable resource use, the number of streams which the peer has initiated but which the local application has not yet accepted will be kept below this threshold.
Because it takes at least one round trip for an endpoint to open a new stream and be notified of its peer's flow control updates, this imposes a hard upper bound on the number of streams that may be opened per round-trip. In other words, this should be set to at least the desired number of streams opened per unit time, multiplied by the round trip time.
Note that worst-case memory use is directly proportional to stream_window_bidi * stream_receive_window
, with an upper bound proportional to receive_window
.
stream_window_uni: u64
Variant of stream_window_bidi
affecting unidirectional streams
idle_timeout: u64
Maximum duration of inactivity to accept before timing out the connection (s).
The actual value used is the minimum of this and the peer's own idle timeout. 0 for none.
stream_receive_window: u64
Maximum number of bytes the peer may transmit without acknowledgement on any one stream before becoming blocked.
This should be set to at least the expected connection latency multiplied by the maximum
desired throughput. Setting this smaller than receive_window
helps ensure that a single
stream doesn't monopolize receive buffers, which may otherwise occur if the application
chooses not to read from a large stream for a time while still requiring data on other
streams.
receive_window: u64
Maximum number of bytes the peer may transmit across all streams of a connection before becoming blocked.
This should be set to at least the expected connection latency multiplied by the maximum desired throughput. Larger values can be useful to allow maximum throughput within a stream while another is blocked.
max_tlps: u32
Maximum number of tail loss probes before an RTO fires.
packet_threshold: u32
Maximum reordering in packet number space before FACK style loss detection considers a packet lost.
time_threshold: u16
Maximum reordering in time space before time based loss detection considers a packet lost. 0.16 format, added to 1
delayed_ack_timeout: u64
The length of the peer’s delayed ack timer (μs).
initial_rtt: u64
The RTT used before an RTT sample is taken (μs)
max_datagram_size: u64
The max packet size that was used for calculating default and minimum congestion windows.
initial_window: u64
Default limit on the amount of outstanding data in bytes.
Recommended value: min(10 * max_datagram_size, max(2 * max_datagram_size, 14600))
minimum_window: u64
Default minimum congestion window.
Recommended value: 2 * max_datagram_size
.
loss_reduction_factor: u16
Reduction in congestion window when a new loss event is detected. 0.16 format
persistent_congestion_threshold: u32
Number of consecutive PTOs after which network is considered to be experiencing persistent congestion.
local_cid_len: usize
Length of connection IDs for the endpoint.
This must be either 0 or between 4 and 18 inclusive. The length of the local connection IDs constrains the amount of simultaneous connections the endpoint can maintain. The API user is responsible for making sure that the pool is large enough to cover the intended usage.
reset_key: SigningKey
Private key used to send authenticated connection resets to peers who were communicating with a previous instance of this endpoint.
Must be persisted across restarts to be useful.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> Erased for T
impl<T> Erased for T