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

@@ -121,6 +121,14 @@ where
}
}
/// 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.connection.set_target_window_size(size);
}
/// Returns `Ready` when the underlying connection has closed.
pub fn poll_close(&mut self) -> Poll<(), ::Error> {
self.connection.poll().map_err(Into::into)