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(crate) use self::error::Error; 11 pub(crate) use self::peer::{Dyn as DynPeer, Peer}; 12 pub(crate) use self::ping_pong::UserPings; 13 pub(crate) use self::streams::{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; 34 pub const DEFAULT_RESET_STREAM_MAX: usize = 10; 35 pub const DEFAULT_RESET_STREAM_SECS: u64 = 30; 36