1 | mod connection; |
2 | mod error; |
3 | mod go_away; |
4 | mod peer; |
5 | mod ping_pong; |
6 | mod settings; |
7 | mod streams; |
8 | |
9 | pub(crate) use self::connection::{Config, Connection}; |
10 | pub use self::error::{Error, Initiator}; |
11 | pub(crate) use self::peer::{Dyn as DynPeer, Peer}; |
12 | pub(crate) use self::ping_pong::UserPings; |
13 | pub(crate) use self::streams::{DynStreams, OpaqueStreamRef, StreamRef, Streams}; |
14 | pub(crate) use self::streams::{Open, PollReset, Prioritized}; |
15 | |
16 | use crate::codec::Codec; |
17 | |
18 | use self::go_away::GoAway; |
19 | use self::ping_pong::PingPong; |
20 | use self::settings::Settings; |
21 | |
22 | use crate::frame::{self, Frame}; |
23 | |
24 | use bytes::Buf; |
25 | |
26 | use tokio::io::AsyncWrite; |
27 | |
28 | pub type PingPayload = [u8; 8]; |
29 | |
30 | pub type WindowSize = u32; |
31 | |
32 | // Constants |
33 | pub const MAX_WINDOW_SIZE: WindowSize = (1 << 31) - 1; // i32::MAX as u32 |
34 | pub const DEFAULT_REMOTE_RESET_STREAM_MAX: usize = 20; |
35 | pub const DEFAULT_LOCAL_RESET_COUNT_MAX: usize = 1024; |
36 | pub const DEFAULT_RESET_STREAM_MAX: usize = 10; |
37 | pub const DEFAULT_RESET_STREAM_SECS: u64 = 30; |
38 | pub const DEFAULT_MAX_SEND_BUFFER_SIZE: usize = 1024 * 400; |
39 | |