1 // Copyright (c) 2023 Huawei Device Co., Ltd.
2 // Licensed under the Apache License, Version 2.0 (the "License");
3 // you may not use this file except in compliance with the License.
4 // You may obtain a copy of the License at
5 //
6 //     http://www.apache.org/licenses/LICENSE-2.0
7 //
8 // Unless required by applicable law or agreed to in writing, software
9 // distributed under the License is distributed on an "AS IS" BASIS,
10 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 // See the License for the specific language governing permissions and
12 // limitations under the License.
13 
14 //! Http2 Protocol module.
15 //!
16 //! A module that manages frame transport over HTTP2 protocol.
17 //!
18 //! -[`SendData`] is used to control io write half for send frames.
19 //! -[`RecvData`] is used to control io read half for recv frames.
20 //! -[`Streams`] is used to manage the state of individual streams.
21 //! -[`ConnManager`] is used to coordinate the Request sending and Response
22 //! receiving of multiple streams.
23 
24 mod buffer;
25 mod data_ref;
26 mod input;
27 mod manager;
28 mod output;
29 mod streams;
30 
31 #[cfg(feature = "ylong_base")]
32 mod io;
33 
34 pub(crate) use buffer::FlowControl;
35 pub(crate) use data_ref::BodyDataRef;
36 pub(crate) use input::SendData;
37 #[cfg(feature = "ylong_base")]
38 pub(crate) use io::{split, Reader, Writer};
39 pub(crate) use manager::ConnManager;
40 pub(crate) use output::RecvData;
41 pub(crate) use streams::{H2StreamState, RequestWrapper, StreamEndState, Streams};
42 
43 pub const MAX_FLOW_CONTROL_WINDOW: u32 = (1 << 31) - 1;
44