p2p/discovery/discovery library

Classes

BackoffCache
Cache for peer information with backoff
BackoffDiscovery
BackoffDiscovery is an implementation of discovery that caches peer data and attenuates repeated queries
Clock
Interface for getting the current time
DiscoveryRouting
DiscoveryRouting is an implementation of ContentRouting using Discovery.
MdnsConstants
Constants for mDNS service
MdnsDiscovery
Implementation of mDNS discovery for libp2p
MdnsNotifee
Interface for handling discovered peers
PeerInfo
Metadata about a peer
RealClock
Real implementation of Clock using system time
RoutingDiscovery
RoutingDiscovery is an implementation of discovery using ContentRouting. Namespaces are translated to Cids using the SHA256 hash.

Functions

checkUpdates(Map<PeerId, AddrInfo> orig, Map<PeerId, AddrInfo> update) bool
Checks if the peer addresses have changed
findPeerDispatcher(BackoffCache c, Stream<AddrInfo> peerStream) → void
Dispatches peers from a discovery query to all registered channels
findPeerReceiver(StreamController<AddrInfo> peerController, Stream<AddrInfo> evtStream, List<AddrInfo> rcvPeers) → void
Receives peers from a dispatcher and forwards them to a result channel