mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-30 16:31:57 +00:00
[WIP] Integrate multiplex in the examples
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user