resets too

This commit is contained in:
Oliver Gould
2017-07-17 08:18:38 +00:00
parent 76cb8e15fd
commit fb4f0bc5af
16 changed files with 296 additions and 91 deletions

View File

@@ -64,6 +64,14 @@ pub enum StreamState {
}
impl StreamState {
pub fn is_closed(&self) -> bool {
use self::StreamState::*;
match self {
&Closed => true,
_ => false,
}
}
/// Transition the state to represent headers being received.
///
/// Returns true if this state transition results in iniitializing the
@@ -296,6 +304,10 @@ impl StreamMap {
self.inner.entry(id)
}
pub fn remove(&mut self, id: &StreamId) -> Option<StreamState> {
self.inner.remove(id)
}
pub fn shrink_all_local_windows(&mut self, decr: u32) {
for (_, mut s) in &mut self.inner {
if let Some(fc) = s.local_flow_controller() {