Struct ptproxy::config::TransportConfig
source · 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