Skip to main content

Crate irontide_session

Crate irontide_session 

Source
Expand description

BitTorrent session management: peers, torrents, and piece selection.

Re-exports§

pub use alert::Alert;
pub use alert::AlertCategory;
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 i2p::I2pDestination;
pub use i2p::I2pDestinationError;
pub use resume_file::ResumeFileError;
pub use resume_file::default_resume_dir;
pub use stats::MetricKind;
pub use stats::NUM_METRICS;
pub use stats::SessionCounters;
pub use stats::SessionStatsMetric;
pub use stats::session_stats_metrics;
pub use streaming::FileStream;
pub use transport::BoxedStream;
pub use transport::NetworkFactory;
pub use transport::TransportListener;

Modules§

alert
Alert/event system for push-based notifications.
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 plugin interface for custom BEP 10 extensions.
hash_pool
Dedicated thread pool for CPU-bound piece hash verification (M96).
i2p
I2P support via the SAM v3.1 bridge protocol.
resume_file
Resume file persistence: serialize, deserialize, atomic write, and directory helpers. Resume file persistence: serialize, deserialize, atomic write, and directory helpers.
stats
Session statistics metric registry and atomic counter array.
streaming
File streaming — AsyncRead + AsyncSeek over individual torrent files.
transport
Network transport abstraction layer.

Structs§

BanConfig
Configuration for smart banning behaviour.
DhtNodeEntry
A DHT bootstrap node entry for session persistence.
FileInfo
Info about a file within a torrent.
FileStatus
Status of a single file within a torrent.
IpFilter
IP address filter supporting both IPv4 and IPv6 ranges.
PartialPieceInfo
In-flight piece download status for the download queue.
PeerInfo
Per-peer details exported for client UI introspection.
PeerPipelineSnapshot
Point-in-time snapshot of [PeerPipelineStats].
PeerStrikeEntry
A peer strike entry for session persistence.
PortFilter
Port range filter.
ProxyConfig
Proxy connection settings.
ResumeLoadResult
Result of loading resume state from disk (M161 Phase 4).
SessionHandle
Cloneable handle for interacting with a running session.
SessionState
Persisted session state containing a DHT node cache and torrent resume data.
SessionStats
Aggregate statistics for the whole session.
Settings
Unified session settings (replaces SessionConfig).
TorrentConfig
Configurable parameters for a torrent session.
TorrentFlags
Bitflag convenience wrapper for common torrent state flags.
TorrentHandle
Cloneable handle for interacting with a running torrent.
TorrentInfo
Metadata about a torrent (available after metadata is fetched).
TorrentStats
Aggregate statistics for a torrent.
TorrentSummary
Lightweight summary of a torrent for the HTTP API.
TrackerInfo
Public info about a single tracker.

Enums§

ChokingAlgorithm
Top-level choking algorithm variant.
Error
Errors that can occur during session operations.
FileMode
Whether a file in a torrent is open and its I/O access mode.
IpFilterError
Errors from parsing IP filter files.
MixedModeAlgorithm
Mixed-mode bandwidth allocation algorithm for TCP/uTP coexistence.
PeerSource
Origin of a peer address.
ProxyType
Supported proxy protocols (matching libtorrent).
SeedChokingAlgorithm
Choking algorithm used when we are seeding.
TorrentState
Current state of a torrent.
TrackerStatus
Public tracker status (simplified view of internal TrackerState).

Functions§

build_wanted_pieces
Build a bitfield marking which pieces are wanted based on file priorities.
parse_dat
Parse an eMule .dat format blocklist.
parse_p2p
Parse a P2P plaintext format blocklist.
validate_resume_bitfield
Returns true if the pieces bitfield has the correct length for num_pieces pieces (i.e. ceil(num_pieces / 8) bytes).

Type Aliases§

Result
Convenience alias for Result<T, Error>.
StorageFactory
Type alias for a factory that creates per-torrent storage.