p2panda-net 0.6.1

Data-type-agnostic p2p networking, discovery, gossip and local-first sync
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
// SPDX-License-Identifier: MIT OR Apache-2.0

mod connection;
mod endpoint;

pub use endpoint::{ConnectError, IrohEndpoint, IrohEndpointArgs, ToIrohEndpoint};

/// Returns true if endpoint is globally reachable.
pub(crate) fn is_globally_reachable_endpoint(addr: iroh::EndpointAddr) -> bool {
    addr.ip_addrs()
        .any(|addr| crate::utils::connectivity_status(addr).is_global())
}