1mod buffer;
2mod counts;
3mod flow_control;
4mod prioritize;
5mod recv;
6mod send;
7mod state;
8mod store;
9mod stream;
10#[allow(clippy::module_inception)]
11mod streams;
1213pub(crate) use self::prioritize::Prioritized;
14pub(crate) use self::recv::Open;
15pub(crate) use self::send::PollReset;
16pub(crate) use self::streams::{DynStreams, OpaqueStreamRef, StreamRef, Streams};
1718use self::buffer::Buffer;
19use self::counts::Counts;
20use self::flow_control::FlowControl;
21use self::prioritize::Prioritize;
22use self::recv::Recv;
23use self::send::Send;
24use self::state::State;
25use self::store::Store;
26use self::stream::Stream;
2728use crate::frame::{StreamId, StreamIdOverflow};
29use crate::proto::*;
3031use bytes::Bytes;
32use std::time::Duration;
3334#[derive(Debug)]
35pub struct Config {
36/// Initial window size of locally initiated streams
37pub local_init_window_sz: WindowSize,
3839/// Initial maximum number of locally initiated streams.
40 /// After receiving a Settings frame from the remote peer,
41 /// the connection will overwrite this value with the
42 /// MAX_CONCURRENT_STREAMS specified in the frame.
43pub initial_max_send_streams: usize,
4445/// Max amount of DATA bytes to buffer per stream.
46pub local_max_buffer_size: usize,
4748/// The stream ID to start the next local stream with
49pub local_next_stream_id: StreamId,
5051/// If the local peer is willing to receive push promises
52pub local_push_enabled: bool,
5354/// If extended connect protocol is enabled.
55pub extended_connect_protocol_enabled: bool,
5657/// How long a locally reset stream should ignore frames
58pub local_reset_duration: Duration,
5960/// Maximum number of locally reset streams to keep at a time
61pub local_reset_max: usize,
6263/// Maximum number of remotely reset "pending accept" streams to keep at a
64 /// time. Going over this number results in a connection error.
65pub remote_reset_max: usize,
6667/// Initial window size of remote initiated streams
68pub remote_init_window_sz: WindowSize,
6970/// Maximum number of remote initiated streams
71pub remote_max_initiated: Option<usize>,
7273/// Maximum number of locally reset streams due to protocol error across
74 /// the lifetime of the connection.
75 ///
76 /// When this gets exceeded, we issue GOAWAYs.
77pub local_max_error_reset_streams: Option<usize>,
78}