Get data frames working

This commit is contained in:
Carl Lerche
2017-07-08 12:34:29 -07:00
parent f6b6d0c7e8
commit 981af88838
17 changed files with 523 additions and 146 deletions

View File

@@ -34,7 +34,7 @@ pub mod server;
mod util;
pub use error::{ConnectionError, StreamError, Reason};
pub use error::ConnectionError;
pub use frame::{StreamId};
pub use proto::Connection;
@@ -42,15 +42,15 @@ use bytes::Bytes;
/// An H2 connection frame
#[derive(Debug)]
pub enum Frame<T> {
pub enum Frame<T, B = Bytes> {
Headers {
id: StreamId,
headers: T,
end_of_stream: bool,
},
Body {
Data {
id: StreamId,
chunk: Bytes,
data: B,
end_of_stream: bool,
},
Trailers {