Expand description
Core BitTorrent types: info hashes, metadata, magnets, piece arithmetic, and torrent creation.
Structs§
- AddHashes
Result - Result of adding received hashes to the picker.
- Create
Torrent - Builder for creating
.torrentfiles. - Create
Torrent Result - Result of torrent creation.
- Fast
Resume Data - libtorrent-compatible fast-resume data in bencode format.
- File
Entry - A file entry in multi-file mode.
- File
Hash Info - File info needed to initialize the hash picker.
- File
Info - High-level file info (unified from single-file and multi-file modes).
- Hash
Picker - Coordinates which Merkle hash requests to send to peers.
- Hash
Request - A request for Merkle tree hashes (BEP 52).
- Id20
- 20-byte identifier used for SHA1 info-hashes and peer IDs.
- Id32
- 32-byte identifier used for SHA-256 (
BitTorrentv2). - Info
Dict - The “info” dictionary from a .torrent file.
- Info
Dict V2 - v2 info dictionary (BEP 52).
- Info
Hashes - Holds optional v1 (SHA-1) and v2 (SHA-256) info hashes.
- Lengths
- Piece and chunk arithmetic for
BitTorrentdownloads. - Live
Connection Guard - M224 D3: RAII counter increment for the global connection cap. Wraps
Arc<AtomicUsize>so the live count cannot leak even if the listener/admit loop panics or drops a connection mid-pipeline. dropped automatically when the owning connection is dropped or forwarded. - Magnet
- Parsed magnet link (BEP 9 + BEP 52).
- Merkle
Tree - A complete binary Merkle tree stored in a flat array (1-indexed heap layout).
- Merkle
Tree State - Per-file Merkle tree verification state for BEP 52 downloads.
- PeerId
- A
BitTorrentpeer ID (20 bytes). - Sha1
Hasher - Incremental SHA-1 hasher for streaming piece verification.
- Torrent
Meta V1 - Parsed .torrent file (BEP 3 metainfo, v1).
- Torrent
Meta V2 - Parsed v2 .torrent file (BEP 52).
- Unfinished
Piece - A partial piece that was in progress when the torrent was paused/stopped.
- V2File
Attr - Attributes of a single file in a v2 file tree.
- V2File
Info - Flattened file info from a v2 file tree.
- WebSeed
Stats - Per-URL stats for a single web-seed source, surfaced to the qBt v2
/api/v2/torrents/webseedsendpoint and the GUI’s HTTP Sources tab.
Enums§
- Address
Family - Network address family for dual-stack support.
- Error
- Errors from core
BitTorrentoperations. - File
Priority - Per-file download priority.
- File
Selection - A file selection entry from a BEP 53
so=parameter. - File
Tree Node - A node in the v2 file tree — either a file or a directory.
- SetBlock
Result - Result of setting a block hash in the Merkle tree state.
- Storage
Mode - How torrent files are allocated on disk.
- Torrent
Meta - A parsed torrent file — v1, v2, or hybrid.
- Torrent
Version - Indicates which
BitTorrentprotocol version(s) a torrent supports. - WebSeed
State - Coarse state of a single web-seed source.
Constants§
- DEFAULT_
CHUNK_ SIZE - Default chunk size (16 KiB) — standard in
BitTorrent.
Functions§
- auto_
piece_ size - Auto-select piece size based on total content size (libtorrent-style).
- crc32c
- Compute CRC32C checksum of
data. - random_
bytes - Fill a buffer with pseudo-random bytes (xorshift64, not cryptographic).
- sha1
- Compute SHA1 hash of input bytes.
- sha1_
chunks - Compute SHA1 hash of multiple chunks without concatenating them.
- sha256
- Compute SHA-256 hash of input bytes (used by
BitTorrentv2, BEP 52). - sha256_
chunks - Compute SHA-256 hash of multiple chunks without concatenating them.
- torrent_
from_ bytes - Parse a .torrent file from raw bytes.
- torrent_
from_ bytes_ any - Auto-detect and parse a .torrent file as v1, v2, or hybrid.
- torrent_
v2_ from_ bytes - Parse a v2 .torrent file from raw bytes.
- validate_
hash_ request - Validate a hash request against file parameters.
- xorshift64_
step - One step of an xorshift64 pseudo-random sequence.
Type Aliases§
- Result
- Result type alias for irontide-core operations.