Wire up trailers

This commit is contained in:
Carl Lerche
2017-08-10 20:24:52 -07:00
parent 48c9734249
commit 10fd4ae7ed
2 changed files with 15 additions and 8 deletions

View File

@@ -146,10 +146,20 @@ impl<B> Recv<B> where B: Buf {
Ok(())
}
pub fn recv_eos(&mut self, stream: &mut Stream<B>)
/// Transition the stream based on receiving trailers
pub fn recv_trailers<P: Peer>(&mut self,
frame: frame::Headers,
stream: &mut store::Ptr<B>)
-> Result<(), ConnectionError>
{
stream.state.recv_close()
// Transition the state
stream.state.recv_close();
// Push the frame onto the stream's recv buffer
stream.pending_recv.push_back(&mut self.buffer, frame.into());
stream.notify_recv();
Ok(())
}
pub fn recv_data(&mut self,