Skip to content

Commit

Permalink
feat(http2): add initial_max_send_streams method to client builder
Browse files Browse the repository at this point in the history
  • Loading branch information
magurotuna authored and seanmonstar committed Feb 28, 2024
1 parent 3b542c0 commit 1c3be72
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/client/legacy/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1291,6 +1291,26 @@ impl Builder {
self
}

/// Sets the initial maximum of locally initiated (send) streams.
///
/// This value will be overwritten by the value included in the initial
/// SETTINGS frame received from the peer as part of a [connection preface].
///
/// Passing `None` will do nothing.
///
/// If not set, hyper will use a default.
///
/// [connection preface]: https://httpwg.org/specs/rfc9113.html#preface
#[cfg(feature = "http2")]
#[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
pub fn http2_initial_max_send_streams(
&mut self,
initial: impl Into<Option<usize>>,
) -> &mut Self {
self.h2_builder.initial_max_send_streams(initial);
self
}

/// Sets whether to use an adaptive flow control.
///
/// Enabling this will override the limits set in
Expand Down

0 comments on commit 1c3be72

Please sign in to comment.