Skip to content

Commit 32ffba5

Browse files
committed
chore(proto/h2): fix module-level documentation
`proto::h2::ping` has some documentation that won't be rendered properly, because it is written as documentation of an item rather than documenting the enclosing submodule. this commit updates this comment, using `//!` notation. Signed-off-by: katelyn martin <[email protected]>
1 parent 0369f5e commit 32ffba5

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

src/proto/h2/ping.rs

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
/// HTTP2 Ping usage
2-
///
3-
/// hyper uses HTTP2 pings for two purposes:
4-
///
5-
/// 1. Adaptive flow control using BDP
6-
/// 2. Connection keep-alive
7-
///
8-
/// Both cases are optional.
9-
///
10-
/// # BDP Algorithm
11-
///
12-
/// 1. When receiving a DATA frame, if a BDP ping isn't outstanding:
13-
/// 1a. Record current time.
14-
/// 1b. Send a BDP ping.
15-
/// 2. Increment the number of received bytes.
16-
/// 3. When the BDP ping ack is received:
17-
/// 3a. Record duration from sent time.
18-
/// 3b. Merge RTT with a running average.
19-
/// 3c. Calculate bdp as bytes/rtt.
20-
/// 3d. If bdp is over 2/3 max, set new max to bdp and update windows.
1+
//! HTTP2 Ping usage
2+
//!
3+
//! hyper uses HTTP2 pings for two purposes:
4+
//!
5+
//! 1. Adaptive flow control using BDP
6+
//! 2. Connection keep-alive
7+
//!
8+
//! Both cases are optional.
9+
//!
10+
//! # BDP Algorithm
11+
//!
12+
//! 1. When receiving a DATA frame, if a BDP ping isn't outstanding:
13+
//! 1a. Record current time.
14+
//! 1b. Send a BDP ping.
15+
//! 2. Increment the number of received bytes.
16+
//! 3. When the BDP ping ack is received:
17+
//! 3a. Record duration from sent time.
18+
//! 3b. Merge RTT with a running average.
19+
//! 3c. Calculate bdp as bytes/rtt.
20+
//! 3d. If bdp is over 2/3 max, set new max to bdp and update windows.
21+
2122
use std::fmt;
2223
use std::future::Future;
2324
use std::pin::Pin;

0 commit comments

Comments
 (0)