Crate iroh_mainline_content_discovery

Crate iroh_mainline_content_discovery 

Source
Expand description

A library for discovering content using the mainline DHT.

This library contains the protocol for announcing and querying content, as well as the client side implementation and a few helpers for p2p quinn connections.

Modules§

protocol
The protocol for communicating with the tracker.
tls_utils
TLS configuration based on libp2p TLS specs.

Structs§

MergeUntilFirstEnds
UdpDiscovery

Enums§

Connection
TrackerId
A tracker id for queries - either a node id or an address.

Traits§

QuinnConnectionProvider
A connection provider that can be used to connect to a tracker.

Functions§

announce_dht
Announce to the mainline DHT in parallel.
announce_iroh
Announce to a tracker.
announce_quinn
Announce to a tracker.
connect
Connect to a tracker using the crate::protocol::ALPN protocol, using either a node id or an address.
create_quinn_client
Create a quinn client endpoint.
query_dht
Query the mainline DHT for trackers for the given content, then query each tracker for peers.
query_iroh
Assume an existing connection to a tracker and query it for peers for some content.
query_quinn
Assume an existing connection to a tracker and query it for peers for some content.
query_trackers
Query multiple trackers in parallel and merge the results.
to_infohash
The mapping from an iroh HashAndFormat to a bittorrent infohash, aka mainline::Id.