torrentdht 0.1.1

DHT discovery with mTLS handshake handoff; optional BitTorrent when the host opts in
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Shared wire-format helpers with strict bounds.
//!
//! All functions in this module consume **untrusted network bytes**.
//! See `SECURITY.kdl` zone `wire-untrusted`.

mod bitfield;
mod compact;

pub use bitfield::{apply_bitfield, max_bitfield_len, remove_bitfield, validate_bitfield};
pub use compact::{
    decode_nodes, decode_nodes_auto, decode_peer_values, decode_peers, decode_peers_auto,
    encode_nodes, encode_peer_values_list, encode_peers, CompactNode, MAX_COMPACT_NODES,
    MAX_COMPACT_PEERS,
};