pub struct TransportConfig {
    pub max_idle_timeout: Option<u64>,
    pub keep_alive_interval: Option<u64>,
    pub initial_rtt: Option<u64>,
    pub max_concurrent_http_streams: Option<u32>,
    pub stream_receive_window: Option<u64>,
    pub initial_window: Option<u64>,
    pub receive_window: Option<u64>,
    pub send_window: Option<u64>,
    pub socket_receive_buffer_size: Option<usize>,
    pub socket_send_buffer_size: Option<usize>,
    pub congestion_algorithm: CongestionAlgorithm,
}
Expand description

Configuration of the transport configuration of the connection with the peer. These parameters are usually kept identical on both sides.

Fields§

§max_idle_timeout: Option<u64>

Maximum duration of inactivity to accept before considering the connection dead, in milliseconds. The true idle timeout is the minimum of this and the peer’s own max idle timeout. See [quinn::TransportConfig::max_idle_timeout].
Default: 5000

§keep_alive_interval: Option<u64>

Period of inactivity before sending a keep-alive packet, in milliseconds. Keep-alive packets prevent an inactive but otherwise healthy connection from timing out. See [quinn::TransportConfig::keep_alive_interval].
Default: 2000

§initial_rtt: Option<u64>

Initial estimate of RTT with the peer, in milliseconds. This is the value used before an RTT sample is taken. See [quinn::TransportConfig::initial_rtt].
Default: see quinn documentation (spec default)

§max_concurrent_http_streams: Option<u32>

Flow control: Maximum number of HTTP streams (requests) that may be open concurrently at any point in time. [quinn::TransportConfig::max_concurrent_bidi_streams] is set to this value (for servers) or to zero (for clients).
Default: 100

§stream_receive_window: Option<u64>

Flow control: Maximum data the peer may transmit without acknowledgement on any one stream before becoming blocked, in bytes. See [quinn::TransportConfig::stream_receive_window].
Default: 1MB

§initial_window: Option<u64>

Congestion control: Size of the initial congestion window, in bytes. See [quinn::congestion::CubicConfig::initial_window].
Default: 14720 (spec default)

§receive_window: Option<u64>

Flow control: Maximum data the peer may transmit across all streams of a connection before becoming blocked, in bytes. See [quinn::TransportConfig::receive_window].
Default: initial_window

§send_window: Option<u64>

Flow control: Maximum data to transmit to a peer without acknowledgment, in bytes. See [quinn::TransportConfig::send_window].
Default: initial_window

§socket_receive_buffer_size: Option<usize>

OS network: Size of the OS’s receive buffer for the UDP socket (SO_RCVBUF option), in bytes. See [socket2::Socket::set_recv_buffer_size].
Default: OS default

§socket_send_buffer_size: Option<usize>

OS network: Size of the OS’s send buffer for the UDP socket (SO_SNDBUF option), in bytes. See [socket2::Socket::set_send_buffer_size].
Default: OS default

§congestion_algorithm: CongestionAlgorithm

Congestion control: Algorithm to use for the congestion controller.
Default: Cubic

Trait Implementations§

source§

impl Debug for TransportConfig

source§

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

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

impl Default for TransportConfig

source§

fn default() -> TransportConfig

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

impl<'de> Deserialize<'de> for TransportConfig

source§

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

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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 Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

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