Skip to content

Commit

Permalink
feat(http2): configure HTTP/2 frame size in the high-level builders t…
Browse files Browse the repository at this point in the history
…oo (#2214)

Oops, I missed this in #2211.
  • Loading branch information
goffrie authored Jun 3, 2020
1 parent b6fb18a commit 2354a7e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,16 @@ impl Builder {
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
/// connection alive.
///
Expand Down
10 changes: 10 additions & 0 deletions src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,16 @@ impl<I, E> Builder<I, E> {
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
/// connections.
///
Expand Down

0 comments on commit 2354a7e

Please sign in to comment.