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 input;
26 mod manager;
27 mod output;
28 mod streams;
29 
30 #[cfg(feature = "ylong_base")]
31 mod io;
32 
33 pub(crate) use buffer::FlowControl;
34 pub(crate) use input::SendData;
35 #[cfg(feature = "ylong_base")]
36 pub(crate) use io::{split, Reader, Writer};
37 pub(crate) use manager::ConnManager;
38 pub(crate) use output::RecvData;
39 pub(crate) use streams::{H2StreamState, RequestWrapper, StreamEndState, Streams};
40 
41 pub const MAX_FLOW_CONTROL_WINDOW: u32 = (1 << 31) - 1;
42