mtorrent_utils/lib.rs
1#![cfg_attr(docsrs, feature(doc_cfg))]
2//! Collection of miscellaneous utilities used by the [`mtorrent`](https://crates.io/crates/mtorrent) crate and its components. Some of the utilities are specific to the BitTorrent protocol, while others are generic and can be used in any Tokio-based application.
3
4/// Bitrate measurement utilities.
5pub mod bandwidth;
6
7/// Bencoding parser and serializer.
8pub mod benc;
9
10/// Rate-limited connection permits for peer addresses.
11pub mod connect_throttle;
12
13/// FIFO set with optional bounded capacity and deduplication.
14pub mod fifo_set;
15
16/// Local IP address discovery and socket helpers.
17pub mod net;
18
19/// Single-value watch channel for `!Send` types.
20pub mod local_watch;
21
22/// Cooperative poll-loop multiplexing multiple futures.
23pub mod loop_select;
24
25/// BitTorrent peer ID generation and wrapper.
26pub mod peer_id;
27
28/// Trait for splitting a bidirectional stream into read/write halves.
29pub mod split_stream;
30
31mod stopwatch;
32
33/// UPnP/IGD port forwarding helpers.
34pub mod upnp;
35
36/// Dedicated single-threaded Tokio worker thread.
37pub mod worker;