add set_target_window_size methods to Server and Client (#149)

Closes #101
This commit is contained in:
Sean McArthur
2017-10-13 11:19:56 -07:00
committed by GitHub
parent 2fcf8c3740
commit 5c1bde7d62
10 changed files with 347 additions and 33 deletions

View File

@@ -243,6 +243,21 @@ impl Default for Builder {
// ===== impl Connection =====
impl<T, B> Connection<T, B>
where
T: AsyncRead + AsyncWrite,
B: IntoBuf,
{
/// Sets the target window size for the whole connection.
///
/// Default in HTTP2 is 65_535.
pub fn set_target_window_size(&mut self, size: u32) {
assert!(size <= proto::MAX_WINDOW_SIZE);
self.inner.set_target_window_size(size);
}
}
impl<T, B> Future for Connection<T, B>
where
T: AsyncRead + AsyncWrite,