pub async fn local_addr(&self) -> io::Result<SocketAddr> {
        let (tx, rx) = oneshot::channel();

        fn error() -> io::Error {
            io::Error::new(io::ErrorKind::Other, "DhtHandler has shut down")
        }

        self.send
            .send(OneshotTask::GetLocalAddr(tx))
            .map_err(|_| error())?;

        rx.await.map_err(|_| error())
    }
/// Get the local address this DHT instance is bound to
Get the local address this DHT instance is bound to
Get the local address this DHT instance is bound to
pub async fn local_addr(&self) -> io::Result<SocketAddr> {
        let (tx, rx) = oneshot::channel();
        fn error() -> io::Error {
            io::Error::new(io::ErrorKind::Other, "DhtHandler has shut down")
        }
        self.send
            .send(OneshotTask::GetLocalAddr(tx))
            .map_err(|_| error())?;
        rx.await.map_err(|_| error())
    }
pub async fn local_addr ( & self ) -> io :: Result < SocketAddr > { let ( tx , rx ) = oneshot :: channel ( ) ; fn error ( ) -> io :: Error { io :: Error :: new ( io :: ErrorKind :: Other , " " ) } self . send . send ( OneshotTask :: GetLocalAddr ( tx ) ) . map_err ( | _ | error ( ) ) ? ; rx . await . map_err ( | _ | error ( ) ) }
Get the local address this DHT instance is bound to
Get the local address this DHT instance is bound to
&self
&self