Skip to main content

Crate rift_discovery

Crate rift_discovery 

Source
Expand description

Peer discovery helpers (mDNS + optional DHT).

This module provides LAN discovery via mDNS and optional internet discovery via the DHT. It exposes async helpers to start advertisements and streams of discovered peers.

Structs§

DiscoveryConfig
MdnsHandle
Keeps the mDNS daemon and service registration alive.
PeerInfo

Enums§

DiscoveryError
DiscoveryMode

Functions§

dht_announce
Announce a peer in the DHT for the given channel.
dht_lookup
Lookup peers in the DHT for the given channel.
discover_peers
Start browsing for peers in the same channel on the LAN.
local_ipv4_addrs
Enumerate local IPv4 addresses for mDNS advertisement.
start_dht
Start a DHT instance for internet discovery.
start_mdns_advertisement
Publish this peer’s presence on the LAN via mDNS.