Wire up Trailers frame

This commit is contained in:
Carl Lerche
2017-08-02 11:34:34 -07:00
parent 33bdc057d6
commit a3cbf2d7ac
6 changed files with 50 additions and 18 deletions

View File

@@ -87,7 +87,12 @@ impl<P: Peer> Streams<P> {
};
if frame.is_trailers() {
try!(self.inner.recv.recv_trailers(state, frame.is_end_stream()));
if !frame.is_end_stream() {
// TODO: What error should this return?
unimplemented!();
}
try!(self.inner.recv.recv_eos(state));
} else {
try!(self.inner.recv.recv_headers(state, frame.is_end_stream()));
}
@@ -174,7 +179,7 @@ impl<P: Peer> Streams<P> {
};
if frame.is_trailers() {
try!(self.inner.send.send_trailers(state, frame.is_end_stream()));
try!(self.inner.send.send_eos(state));
} else {
try!(self.inner.send.send_headers(state, frame.is_end_stream()));
}