Skip to main content

Crate irontide_core

Crate irontide_core 

Source
Expand description

Core BitTorrent types: info hashes, metadata, magnets, piece arithmetic, and torrent creation.

Structs§

AddHashesResult
Result of adding received hashes to the picker.
CreateTorrent
Builder for creating .torrent files.
CreateTorrentResult
Result of torrent creation.
FastResumeData
libtorrent-compatible fast-resume data in bencode format.
FileEntry
A file entry in multi-file mode.
FileHashInfo
File info needed to initialize the hash picker.
FileInfo
High-level file info (unified from single-file and multi-file modes).
HashPicker
Coordinates which Merkle hash requests to send to peers.
HashRequest
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 (BitTorrent v2).
InfoDict
The “info” dictionary from a .torrent file.
InfoDictV2
v2 info dictionary (BEP 52).
InfoHashes
Holds optional v1 (SHA-1) and v2 (SHA-256) info hashes.
Lengths
Piece and chunk arithmetic for BitTorrent downloads.
LiveConnectionGuard
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).
MerkleTree
A complete binary Merkle tree stored in a flat array (1-indexed heap layout).
MerkleTreeState
Per-file Merkle tree verification state for BEP 52 downloads.
PeerId
A BitTorrent peer ID (20 bytes).
Sha1Hasher
Incremental SHA-1 hasher for streaming piece verification.
TorrentMetaV1
Parsed .torrent file (BEP 3 metainfo, v1).
TorrentMetaV2
Parsed v2 .torrent file (BEP 52).
UnfinishedPiece
A partial piece that was in progress when the torrent was paused/stopped.
V2FileAttr
Attributes of a single file in a v2 file tree.
V2FileInfo
Flattened file info from a v2 file tree.
WebSeedStats
Per-URL stats for a single web-seed source, surfaced to the qBt v2 /api/v2/torrents/webseeds endpoint and the GUI’s HTTP Sources tab.

Enums§

AddressFamily
Network address family for dual-stack support.
Error
Errors from core BitTorrent operations.
FilePriority
Per-file download priority.
FileSelection
A file selection entry from a BEP 53 so= parameter.
FileTreeNode
A node in the v2 file tree — either a file or a directory.
SetBlockResult
Result of setting a block hash in the Merkle tree state.
StorageMode
How torrent files are allocated on disk.
TorrentMeta
A parsed torrent file — v1, v2, or hybrid.
TorrentVersion
Indicates which BitTorrent protocol version(s) a torrent supports.
WebSeedState
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 BitTorrent v2, 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.