Many more changes

This commit is contained in:
Carl Lerche
2017-08-11 12:00:22 -07:00
parent 012646ab46
commit 32d4c2d5a9
14 changed files with 246 additions and 96 deletions

View File

@@ -48,6 +48,21 @@ impl FlowControl {
}
}
/// Reduce future capacity of the window.
///
/// This accomodates updates to SETTINGS_INITIAL_WINDOW_SIZE.
pub fn shrink_window(&mut self, dec: WindowSize) {
/*
if decr < self.next_window_update {
self.next_window_update -= decr
} else {
self.underflow += decr - self.next_window_update;
self.next_window_update = 0;
}
*/
}
/// Claims the provided amount from the window, if there is enough space.
///
/// Fails when `apply_window_update()` hasn't returned at least `sz` more bytes than