pub struct QuicTransportConfig(/* private fields */);Expand description
Parameters governing the core QUIC state machine
Default values should be suitable for most internet applications. Applications protocols which
forbid remotely-initiated streams should set max_concurrent_bidi_streams and
max_concurrent_uni_streams to zero.
In some cases, performance or resource requirements can be improved by tuning these values to suit a particular application and/or network connection. In particular, data window sizes can be tuned for a particular expected round trip time, link capacity, and memory availability. Tuning for higher bandwidths and latencies increases worst-case memory consumption, but does not impair performance at lower bandwidths and latencies. The default configuration is tuned for a 100Mbps link with a 100ms round trip time.
Use the QuicTransportConfigBuilder to customize these tunable fields.
In iroh, the config has some specific default values that make iroh’s holepunching work well with QUIC multipath. Adjusting those settings may cause suboptimal usage.
Look at the following methods for more details:
QuicTransportConfigBuilder::default_path_keep_alive_intervalQuicTransportConfigBuilder::default_path_max_idle_timeoutQuicTransportConfigBuilder::max_concurrent_multipath_pathsQuicTransportConfigBuilder::max_remote_nat_traversal_addresses
§Examples
use std::time::Duration;
use iroh::endpoint::QuicTransportConfig;
let _cfg = QuicTransportConfig::builder()
.send_observed_address_reports(true)
.build();Implementations§
Source§impl QuicTransportConfig
impl QuicTransportConfig
Sourcepub fn builder() -> QuicTransportConfigBuilder
pub fn builder() -> QuicTransportConfigBuilder
Returns a default QuicTransportConfigBuilder that allows customizing
a QuicTransportConfig.
Trait Implementations§
Source§impl Clone for QuicTransportConfig
impl Clone for QuicTransportConfig
Source§fn clone(&self) -> QuicTransportConfig
fn clone(&self) -> QuicTransportConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for QuicTransportConfig
impl Debug for QuicTransportConfig
Auto Trait Implementations§
impl Freeze for QuicTransportConfig
impl !RefUnwindSafe for QuicTransportConfig
impl Send for QuicTransportConfig
impl Sync for QuicTransportConfig
impl Unpin for QuicTransportConfig
impl !UnwindSafe for QuicTransportConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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