Simplify control streams (#8)

This commit is contained in:
Carl Lerche
2017-07-26 16:53:31 -07:00
committed by GitHub
parent bd3a07f9e7
commit 13d6866ee8
13 changed files with 152 additions and 327 deletions

View File

@@ -13,13 +13,13 @@ use std::marker::PhantomData;
/// An H2 connection
#[derive(Debug)]
pub struct Connection<T, P, B: IntoBuf = Bytes> {
inner: Transport<T, P, B::Buf>,
inner: Transport<T, B::Buf>,
// Set to `true` as long as the connection is in a valid state.
active: bool,
_phantom: PhantomData<(P, B)>,
}
pub fn new<T, P, B>(transport: Transport<T, P, B::Buf>)
pub fn new<T, P, B>(transport: Transport<T, B::Buf>)
-> Connection<T, P, B>
where T: AsyncRead + AsyncWrite,
P: Peer,