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