ignore received frames on a stream locally reset for some time (#174)

- Adds config duration for how long to ignore frames on a reset stream
- Adds config for how many reset streams can be held at a time
This commit is contained in:
Sean McArthur
2017-12-18 11:09:38 -08:00
committed by GitHub
parent edaeaa8941
commit 1ea9a8fc7e
19 changed files with 684 additions and 125 deletions

View File

@@ -1,4 +1,4 @@
use {FutureExt, SendFrame};
use {frames, FutureExt, SendFrame};
use h2::{self, RecvError, SendError};
use h2::frame::{self, Frame};
@@ -441,6 +441,15 @@ pub trait HandleFutureExt {
}
}
fn ping_pong(self, payload: [u8; 8]) -> RecvFrame<<SendFrameFut<Self> as IntoRecvFrame>::Future>
where
Self: Future<Item=Handle> + Sized + 'static,
Self::Error: fmt::Debug,
{
self.send_frame(frames::ping(payload))
.recv_frame(frames::ping(payload).pong())
}
fn idle_ms(self, ms: usize) -> Box<Future<Item = Handle, Error = Self::Error>>
where
Self: Sized + 'static,