feat(http2): configure HTTP/2 frame size in the high-level builders too (#2214)

Oops, I missed this in #2211.
This commit is contained in:
Geoffry Song
2020-06-02 19:45:12 -07:00
committed by GitHub
parent b6fb18aee0
commit 2354a7eec3
2 changed files with 20 additions and 0 deletions

View File

@@ -1040,6 +1040,16 @@ impl Builder {
self self
} }
/// Sets the maximum frame size to use for HTTP2.
///
/// Passing `None` will do nothing.
///
/// If not set, hyper will use a default.
pub fn http2_max_frame_size(&mut self, sz: impl Into<Option<u32>>) -> &mut Self {
self.conn_builder.http2_max_frame_size(sz);
self
}
/// Sets an interval for HTTP2 Ping frames should be sent to keep a /// Sets an interval for HTTP2 Ping frames should be sent to keep a
/// connection alive. /// connection alive.
/// ///

View File

@@ -342,6 +342,16 @@ impl<I, E> Builder<I, E> {
self self
} }
/// Sets the maximum frame size to use for HTTP2.
///
/// Passing `None` will do nothing.
///
/// If not set, hyper will use a default.
pub fn http2_max_frame_size(mut self, sz: impl Into<Option<u32>>) -> Self {
self.protocol.http2_max_frame_size(sz);
self
}
/// Sets the [`SETTINGS_MAX_CONCURRENT_STREAMS`][spec] option for HTTP2 /// Sets the [`SETTINGS_MAX_CONCURRENT_STREAMS`][spec] option for HTTP2
/// connections. /// connections.
/// ///