fn randomize_tcp_port(addr: &Multiaddr) -> Multiaddr {
        let mut new_addr = Multiaddr::empty();
        for p in addr.iter() {
            if let Protocol::Tcp(_) = p {
                new_addr.push(Protocol::Tcp(get_available_port()));
            } else {
                new_addr.push(p);
            }
        }
        new_addr
    }
// Given a multiaddr, randomizes its Tcp port if present.
Given a multiaddr, randomizes its Tcp port if present.
Given a multiaddr randomizes its Tcp port if present .
fn randomize_tcp_port(addr: &Multiaddr) -> Multiaddr {
        let mut new_addr = Multiaddr::empty();
        for p in addr.iter() {
            if let Protocol::Tcp(_) = p {
                new_addr.push(Protocol::Tcp(get_available_port()));
            } else {
                new_addr.push(p);
            }
        }
        new_addr
    }
fn randomize_tcp_port ( addr : & Multiaddr ) -> Multiaddr { let mut new_addr = Multiaddr :: empty ( ) ; for p in addr . iter ( ) { if let Protocol :: Tcp ( _ ) = p { new_addr . push ( Protocol :: Tcp ( get_available_port ( ) ) ) ; } else { new_addr . push ( p ) ; } } new_addr }
Given a multiaddr, randomizes its Tcp port if present.
Given a multiaddr randomizes its Tcp port if present .
addr
&Multiaddr