update comments
This commit is contained in:
@@ -4,12 +4,7 @@ use frame::{self, Frame};
|
||||
use proto::*;
|
||||
use proto::ready::ReadySink;
|
||||
|
||||
// TODO track "last stream id" for GOAWAY.
|
||||
// TODO track/provide "next" stream id.
|
||||
// TODO reset_streams needs to be bounded.
|
||||
// TODO track reserved streams (PUSH_PROMISE).
|
||||
|
||||
/// Handles end-of-stream frames sent from the remote.
|
||||
/// Tracks END_STREAM frames received from the remote peer.
|
||||
#[derive(Debug)]
|
||||
pub struct StreamRecvClose<T> {
|
||||
inner: T,
|
||||
@@ -25,6 +20,7 @@ impl<T, U> StreamRecvClose<T>
|
||||
}
|
||||
}
|
||||
|
||||
/// Tracks END_STREAM frames received from the remote peer.
|
||||
impl<T> Stream for StreamRecvClose<T>
|
||||
where T: Stream<Item = Frame, Error = ConnectionError>,
|
||||
T: ControlStreams,
|
||||
@@ -55,6 +51,7 @@ impl<T> Stream for StreamRecvClose<T>
|
||||
}
|
||||
}
|
||||
|
||||
// Proxy.
|
||||
impl<T, U> Sink for StreamRecvClose<T>
|
||||
where T: Sink<SinkItem = Frame<U>, SinkError = ConnectionError>,
|
||||
T: ControlStreams,
|
||||
@@ -71,6 +68,7 @@ impl<T, U> Sink for StreamRecvClose<T>
|
||||
}
|
||||
}
|
||||
|
||||
// Proxy.
|
||||
impl<T, U> ReadySink for StreamRecvClose<T>
|
||||
where T: Sink<SinkItem = Frame<U>, SinkError = ConnectionError>,
|
||||
T: ReadySink,
|
||||
@@ -81,6 +79,7 @@ impl<T, U> ReadySink for StreamRecvClose<T>
|
||||
}
|
||||
}
|
||||
|
||||
// Proxy.
|
||||
impl<T: ControlStreams> ControlStreams for StreamRecvClose<T> {
|
||||
fn local_valid_id(id: StreamId) -> bool {
|
||||
T::local_valid_id(id)
|
||||
@@ -142,11 +141,11 @@ impl<T: ControlStreams> ControlStreams for StreamRecvClose<T> {
|
||||
self.inner.remote_active_len()
|
||||
}
|
||||
|
||||
fn update_inital_recv_window_size(&mut self, old_sz: u32, new_sz: u32) {
|
||||
fn update_inital_recv_window_size(&mut self, old_sz: WindowSize, new_sz: WindowSize) {
|
||||
self.inner.update_inital_recv_window_size(old_sz, new_sz)
|
||||
}
|
||||
|
||||
fn update_inital_send_window_size(&mut self, old_sz: u32, new_sz: u32) {
|
||||
fn update_inital_send_window_size(&mut self, old_sz: WindowSize, new_sz: WindowSize) {
|
||||
self.inner.update_inital_send_window_size(old_sz, new_sz)
|
||||
}
|
||||
|
||||
@@ -158,15 +157,16 @@ impl<T: ControlStreams> ControlStreams for StreamRecvClose<T> {
|
||||
self.inner.send_flow_controller(id)
|
||||
}
|
||||
|
||||
fn can_send_data(&mut self, id: StreamId) -> bool {
|
||||
self.inner.can_send_data(id)
|
||||
fn is_send_open(&mut self, id: StreamId) -> bool {
|
||||
self.inner.is_send_open(id)
|
||||
}
|
||||
|
||||
fn can_recv_data(&mut self, id: StreamId) -> bool {
|
||||
self.inner.can_recv_data(id)
|
||||
fn is_recv_open(&mut self, id: StreamId) -> bool {
|
||||
self.inner.is_recv_open(id)
|
||||
}
|
||||
}
|
||||
|
||||
// Proxy.
|
||||
impl<T: ApplySettings> ApplySettings for StreamRecvClose<T> {
|
||||
fn apply_local_settings(&mut self, set: &frame::SettingSet) -> Result<(), ConnectionError> {
|
||||
self.inner.apply_local_settings(set)
|
||||
@@ -177,6 +177,7 @@ impl<T: ApplySettings> ApplySettings for StreamRecvClose<T> {
|
||||
}
|
||||
}
|
||||
|
||||
// Proxy.
|
||||
impl<T: ControlFlow> ControlFlow for StreamRecvClose<T> {
|
||||
fn poll_window_update(&mut self) -> Poll<WindowUpdate, ConnectionError> {
|
||||
self.inner.poll_window_update()
|
||||
@@ -187,6 +188,7 @@ impl<T: ControlFlow> ControlFlow for StreamRecvClose<T> {
|
||||
}
|
||||
}
|
||||
|
||||
// Proxy.
|
||||
impl<T: ControlPing> ControlPing for StreamRecvClose<T> {
|
||||
fn start_ping(&mut self, body: PingPayload) -> StartSend<PingPayload, ConnectionError> {
|
||||
self.inner.start_ping(body)
|
||||
|
||||
Reference in New Issue
Block a user