[WIP] Integrate multiplex in the examples

This commit is contained in:
Pierre Krieger
2017-12-12 10:42:34 +01:00
committed by Vurich
parent e7cfc5ab44
commit 5ddda08170
6 changed files with 22 additions and 11 deletions

View File

@@ -217,7 +217,7 @@ impl<T> OutboundFuture<T> {
}
fn nonce_to_id(id: usize, end: Endpoint) -> u32 {
id as u32 * 2 + if end == Endpoint::Dialer { 1 } else { 0 }
id as u32 * 2 + if end == Endpoint::Dialer { 50 } else { 0 }
}
impl<T: AsyncWrite> Future for OutboundFuture<T> {
@@ -330,6 +330,7 @@ impl<T: AsyncRead + AsyncWrite> StreamMuxer for Multiplex<T> {
}
}
#[derive(Debug, Copy, Clone)]
pub struct MultiplexConfig;
impl<C> ConnectionUpgrade<C> for MultiplexConfig