pub async fn listen(&mut self, addr: &Multiaddr) -> Result<(), Box<dyn error::Error + Send>> {
        debug!("p2p::Client::listen {:?}", addr);

        let (sender, receiver) = oneshot::channel();
        self.sender
            .send(Command::Listen {
                addr: addr.clone(),
                sender,
            })
            .await
            .expect("Command receiver not to be dropped.");
        receiver.await.expect("Sender not to be dropped.")
    }
/// Instruct the swarm to start listening on the specified address.
Instruct the swarm to start listening on the specified address.
Instruct the swarm to start listening on the specified address .
pub async fn listen(&mut self, addr: &Multiaddr) -> Result<(), Box<dyn error::Error + Send>> {
        debug!("p2p::Client::listen {:?}", addr);
        let (sender, receiver) = oneshot::channel();
        self.sender
            .send(Command::Listen {
                addr: addr.clone(),
                sender,
            })
            .await
            .expect("Command receiver not to be dropped.");
        receiver.await.expect("Sender not to be dropped.")
    }
pub async fn listen ( & mut self , addr : & Multiaddr ) -> Result < ( ) , Box < dyn error :: Error + Send > > { debug ! ( " " addr ) ; let ( sender , receiver ) = oneshot :: channel ( ) ; self . sender . send ( Command :: Listen { addr : addr . clone ( ) , sender , } ) . await . expect ( " " ) ; receiver . await . expect ( " " ) }
Instruct the swarm to start listening on the specified address.
Instruct the swarm to start listening on the specified address .
&mut self
addr
&Multiaddr
&mut self
addr
&Multiaddr