Stub out priority

This commit is contained in:
Carl Lerche
2017-08-10 23:17:21 -07:00
parent c439232ed2
commit 23b2ef49cc
6 changed files with 110 additions and 26 deletions

View File

@@ -142,6 +142,10 @@ impl<T, P, B> Connection<T, P, B>
trace!("recv WINDOW_UPDATE; frame={:?}", frame);
self.streams.recv_window_update(frame)?;
}
Some(Priority(frame)) => {
trace!("recv PRIORITY; frame={:?}", frame);
// TODO: handle
}
None => {
// TODO: Is this correct?
trace!("codec closed");

View File

@@ -108,8 +108,7 @@ impl<T> FramedRead<T> {
frame::PushPromise::load(head, &bytes[frame::HEADER_LEN..])?.into()
}
Kind::Priority => {
// TODO: implement
return Ok(None);
frame::Priority::load(head, &bytes[frame::HEADER_LEN..])?.into()
}
Kind::Continuation => {
// TODO: Un-hack this

View File

@@ -153,6 +153,12 @@ impl<T, B> Sink for FramedWrite<T, B>
v.encode(self.buf.get_mut());
trace!("encoded window_update; rem={:?}", self.buf.remaining());
}
Frame::Priority(v) => {
// v.encode(self.buf.get_mut());
trace!("encoded priority; rem={:?}", self.buf.remaining());
unimplemented!();
}
Frame::Reset(v) => {
v.encode(self.buf.get_mut());
trace!("encoded reset; rem={:?}", self.buf.remaining());