Immediately apply initial window size to streams

The initial window size should be applied to streams once they leave the
IDLE state.
This commit is contained in:
Carl Lerche
2017-08-24 11:03:33 -07:00
parent 66dbde92ef
commit 6a6c9665cd
6 changed files with 69 additions and 21 deletions

View File

@@ -266,6 +266,16 @@ impl State {
}
}
/// Returns true if the stream is in a state such that it could send data in
/// the future.
pub fn could_send_data(&self) -> bool {
match self.inner {
Open { .. } => true,
HalfClosedRemote(_) => true,
_ => false,
}
}
pub fn is_send_streaming(&self) -> bool {
match self.inner {
Open { local: Peer::Streaming, .. } => true,