pub struct ConnectionOptions {
pub send_continue_response: bool,
pub send_date_header: bool,
pub max_concurrent_streams: u32,
pub initial_stream_window_size: u32,
pub initial_connection_window_size: u32,
pub max_frame_size: u32,
pub max_header_list_size: u32,
pub enable_connect_protocol: bool,
pub idle_timeout: Option<Duration>,
pub max_local_error_reset_streams: Option<usize>,
pub max_pending_accept_reset_streams: Option<usize>,
pub max_continuation_frames: usize,
}h2 only.Expand description
Per-connection behavior options.
Fields§
§send_continue_response: boolAnswer requests with 100 Continue when they carry
expect: 100-continue.
send_date_header: boolAdd a Date header to responses.
max_concurrent_streams: u32SETTINGS_MAX_CONCURRENT_STREAMS announced to the peer.
initial_stream_window_size: u32SETTINGS_INITIAL_WINDOW_SIZE: per-stream DATA credit we start with.
initial_connection_window_size: u32Connection-level DATA credit we start with (RFC 9113 Section 6.9.1).
max_frame_size: u32Largest frame (payload) we send or receive (SETTINGS_MAX_FRAME_SIZE).
max_header_list_size: u32Largest decoded header list we accept (SETTINGS_MAX_HEADER_LIST_SIZE).
enable_connect_protocol: boolWhether to enable Extended CONNECT
idle_timeout: Option<Duration>Close the connection after this long with no frame from the peer
(RFC 9113 Section 10.5). None disables the idle timeout.
max_local_error_reset_streams: Option<usize>Maximum number of RST_STREAM frames we send in response to
protocol errors made by the peer over the connection’s lifetime.
None disables the limit; when it is exceeded the connection
closes with GOAWAY ENHANCE_YOUR_CALM (RFC 9113 Section 10.5.2).
max_pending_accept_reset_streams: Option<usize>Maximum number of streams the peer reset before we accepted them.
None disables the limit; when it is exceeded the connection
closes with GOAWAY ENHANCE_YOUR_CALM (RFC 9113 Section 10.5.2).
max_continuation_frames: usizeMaximum number of frames that may compose a single, not-yet-finalized header field block (HEADERS/CONTINUATION). Beyond this a stream is reset as a CONTINUATION flood (CVE-2024-27919).
Trait Implementations§
Source§impl Clone for ConnectionOptions
impl Clone for ConnectionOptions
Source§fn clone(&self) -> ConnectionOptions
fn clone(&self) -> ConnectionOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more