Add muxing trait and architecture

This commit is contained in:
Pierre Krieger
2017-11-28 12:20:28 +01:00
parent 710dec3110
commit b311d66b58
8 changed files with 276 additions and 20 deletions

View File

@ -66,7 +66,7 @@ fn main() {
let future = with_echo.listen_on(swarm::multiaddr::Multiaddr::new("/ip4/0.0.0.0/tcp/10333").unwrap())
.map_err(|_| panic!())
.unwrap()
.for_each(|socket| {
.for_each(|(socket, _)| {
loop_fn(socket, |socket| {
socket.into_future()
.map_err(|(err, _)| err)