Skip to content

Commit 1c3be72

Browse files
magurotunaseanmonstar
authored andcommitted
feat(http2): add initial_max_send_streams method to client builder
1 parent 3b542c0 commit 1c3be72

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/client/legacy/client.rs

+20
Original file line numberDiff line numberDiff line change
@@ -1291,6 +1291,26 @@ impl Builder {
12911291
self
12921292
}
12931293

1294+
/// Sets the initial maximum of locally initiated (send) streams.
1295+
///
1296+
/// This value will be overwritten by the value included in the initial
1297+
/// SETTINGS frame received from the peer as part of a [connection preface].
1298+
///
1299+
/// Passing `None` will do nothing.
1300+
///
1301+
/// If not set, hyper will use a default.
1302+
///
1303+
/// [connection preface]: https://httpwg.org/specs/rfc9113.html#preface
1304+
#[cfg(feature = "http2")]
1305+
#[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
1306+
pub fn http2_initial_max_send_streams(
1307+
&mut self,
1308+
initial: impl Into<Option<usize>>,
1309+
) -> &mut Self {
1310+
self.h2_builder.initial_max_send_streams(initial);
1311+
self
1312+
}
1313+
12941314
/// Sets whether to use an adaptive flow control.
12951315
///
12961316
/// Enabling this will override the limits set in

0 commit comments

Comments
 (0)