Handle more H2 details

This commit is contained in:
Carl Lerche
2017-08-10 21:08:57 -07:00
parent e2fac3e823
commit c439232ed2
5 changed files with 64 additions and 4 deletions

View File

@@ -273,6 +273,14 @@ impl<B> Send<B> where B: Buf {
0
}
pub fn ensure_not_idle(&self, id: StreamId) -> Result<(), ConnectionError> {
if id >= self.next_stream_id {
return Err(ProtocolError.into());
}
Ok(())
}
pub fn dec_num_streams(&mut self) {
self.num_streams -= 1;
}