Much work

This commit is contained in:
Carl Lerche
2017-08-03 15:50:13 -07:00
parent 7a804601c5
commit dd8412d660
11 changed files with 211 additions and 104 deletions

View File

@@ -0,0 +1,27 @@
use super::*;
#[derive(Debug)]
pub(super) struct Stream<B> {
/// Current state of the stream
pub state: State,
/// Frames pending for this stream being sent to the socket
pub pending_send: buffer::Deque<B>,
}
impl<B> Stream<B> {
pub fn new() -> Stream<B> {
Stream {
state: State::default(),
pending_send: buffer::Deque::new(),
}
}
pub fn send_flow_control(&mut self) -> Option<&mut FlowControl> {
self.state.send_flow_control()
}
pub fn recv_flow_control(&mut self) -> Option<&mut FlowControl> {
self.state.recv_flow_control()
}
}