Skip to main content

Crate irontide_engine

Crate irontide_engine 

Source
Expand description

IronTide engine runtime: the per-torrent actor, the per-peer I/O loops, and the non-leaf engine infrastructure (disk I/O, tracker management, alerts, streaming, extensions, SSL).

Renamed from the ROADMAP’s tentative irontide-torrent-actor at the M244b eng-review (Option 3 hybrid + rename). Sits above the pure leaves (irontide-engine-support, irontide-session-types, irontide-peer-io, irontide-settings) and below session-core (irontide-session), which consumes this crate’s public surface via irontide_engine::….

Re-exports§

pub use alert::Alert;
pub use alert::AlertKind;
pub use alert::AlertStream;
pub use disk::DiskConfig;
pub use disk::DiskHandle;
pub use disk::DiskJobFlags;
pub use disk::DiskManagerHandle;
pub use disk::DiskStats;
pub use disk_backend::DisabledDiskIo;
pub use disk_backend::DiskIoBackend;
pub use disk_backend::DiskIoStats;
pub use extension::ExtensionPlugin;
pub use hash_pool::HashJob;
pub use hash_pool::HashPool;
pub use hash_pool::HashResult;
pub use streaming::FileStream;
pub use torrent::TorrentHandle;
pub use tracker_manager::TrackerInfo;
pub use tracker_manager::TrackerStatus;

Modules§

alert
Session alert stream: categories, kinds, and the broadcast surface. Alert/event system for push-based notifications.
blocking_spawner
Blocking task spawner for disk + hashing offload. Bounded blocking-task spawner that uses block_in_place instead of spawn_blocking, eliminating per-call JoinHandle heap allocations.
disk
Disk I/O manager: configuration, handles, and statistics.
disk_backend
Pluggable disk I/O backend trait and implementations. Pluggable disk I/O backend abstraction.
extension
Extension-protocol (BEP 10) plugin surface. Extension plugin interface for custom BEP 10 extensions.
hash_pool
Parallel SHA-1/SHA-256 piece-hashing pool. Dedicated thread pool for CPU-bound piece hash verification (M96).
metadata
BEP 9 metadata download coordinator.
peer_state
Per-torrent peer pipeline state machine.
proxy
Proxy configuration (SOCKS5 / HTTP) for peer + tracker connections. Proxy support: SOCKS4, SOCKS5, HTTP CONNECT, and SOCKS5 UDP ASSOCIATE.
ssl_manager
SSL/TLS peer connection manager. SSL certificate management for SSL torrents.
streaming
Sequential / streaming file read surface. File streaming — AsyncRead + AsyncSeek over individual torrent files.
torrent
The per-torrent actor handle and its command surface. TorrentActor (single-owner event loop) and TorrentHandle (cloneable public API).
tracker_manager
Per-torrent tracker manager: announce scheduling + status. Per-torrent tracker announce lifecycle management.
url_guard
SSRF-safe URL validation + redirect policy for user-supplied URLs. URL security validation — SSRF mitigation, IDNA rejection, HTTPS enforcement.
verify_before_download
Verify-Before-Download: fast file-size pre-scan (M205). Verify-Before-Download: fast file-size pre-scan (M205).

Structs§

AlertCategory
Bitmask categories for filtering alerts.
PeerPipelineSnapshot
Point-in-time snapshot of [PeerPipelineStats] — relocated to irontide-session-types at M244a; re-exported here so crate::peer_states::PeerPipelineSnapshot resolves unchanged. Point-in-time snapshot of the per-torrent peer-pipeline counters.
ProxyConfig
Proxy connection settings.

Enums§

ChokingAlgorithm
Top-level choking algorithm variant.
Error
Errors that can occur during session operations.
PeerSource
Origin of a peer address — relocated to irontide-session-types at M244a; re-exported here so crate::peer_state::PeerSource resolves unchanged. Origin of a peer address.
ProxyType
Supported proxy protocols (matching libtorrent).
SeedChokingAlgorithm
Choking algorithm used when we are seeding.
TorrentCommand
Commands sent from a TorrentHandle to the TorrentActor.

Functions§

build_wanted_pieces
Build a bitfield marking which pieces are wanted based on file priorities.

Type Aliases§

Result
Convenience alias for Result<T, Error>.