Add an alternative to the swarm (#472)

* Rewrite the swarm

* Small improvement to Debug of ListenersStream

* Fix Swarm::Replaced never being produced

* Fix logic problem when reaching a node in swarm

* Small comment in swarm

* Add closed_multiaddr to Replaced event

* Add address to NodeClosed and NodeError

* Fix concerns

* Remove StreamMuxer::boxed
This commit is contained in:
Pierre Krieger
2018-09-14 13:18:10 +02:00
committed by GitHub
parent 0614b0d44e
commit 063ab178a9
12 changed files with 2603 additions and 2 deletions

View File

@ -210,6 +210,20 @@ where
},
}
}
fn close_inbound(&self) {
match *self {
EitherOutput::First(ref inner) => inner.close_inbound(),
EitherOutput::Second(ref inner) => inner.close_inbound(),
}
}
fn close_outbound(&self) {
match *self {
EitherOutput::First(ref inner) => inner.close_outbound(),
EitherOutput::Second(ref inner) => inner.close_outbound(),
}
}
}
#[derive(Debug, Copy, Clone)]