Skip to main content

hreq_h2/proto/streams/
mod.rs

1mod buffer;
2mod counts;
3mod flow_control;
4mod prioritize;
5mod recv;
6mod send;
7mod state;
8mod store;
9mod stream;
10mod streams;
11
12pub(crate) use self::prioritize::Prioritized;
13pub(crate) use self::recv::Open;
14pub(crate) use self::send::PollReset;
15pub(crate) use self::streams::{OpaqueStreamRef, StreamRef, Streams};
16
17use self::buffer::Buffer;
18use self::counts::Counts;
19use self::flow_control::FlowControl;
20use self::prioritize::Prioritize;
21use self::recv::Recv;
22use self::send::Send;
23use self::state::State;
24use self::store::Store;
25use self::stream::Stream;
26
27use crate::frame::{StreamId, StreamIdOverflow};
28use crate::proto::*;
29
30use bytes::Bytes;
31use std::time::Duration;
32
33#[derive(Debug)]
34pub struct Config {
35    /// Initial window size of locally initiated streams
36    pub local_init_window_sz: WindowSize,
37
38    /// Initial maximum number of locally initiated streams.
39    /// After receiving a Settings frame from the remote peer,
40    /// the connection will overwrite this value with the
41    /// MAX_CONCURRENT_STREAMS specified in the frame.
42    pub initial_max_send_streams: usize,
43
44    /// The stream ID to start the next local stream with
45    pub local_next_stream_id: StreamId,
46
47    /// If the local peer is willing to receive push promises
48    pub local_push_enabled: bool,
49
50    /// How long a locally reset stream should ignore frames
51    pub local_reset_duration: Duration,
52
53    /// Maximum number of locally reset streams to keep at a time
54    pub local_reset_max: usize,
55
56    /// Initial window size of remote initiated streams
57    pub remote_init_window_sz: WindowSize,
58
59    /// Maximum number of remote initiated streams
60    pub remote_max_initiated: Option<usize>,
61}