TorrentStatus

data class TorrentStatus(val infoHash: Sha1Hash, val state: TorrentState, val progress: Float = 0.0f, val totalDone: Long = 0, val downloadRate: Int = 0, val uploadRate: Int = 0, val numPeers: Int = 0, val numSeeds: Int = 0)

A minimal snapshot of a torrent's runtime state, the pure-Kotlin stand-in for the slice of libtorrent::torrent_status (include/libtorrent/torrent_status.hpp) that StateUpdateAlert carries. Only the headline fields clients typically poll are modelled; the full C++ struct has many more.

Constructors

Link copied to clipboard
constructor(infoHash: Sha1Hash, state: TorrentState, progress: Float = 0.0f, totalDone: Long = 0, downloadRate: Int = 0, uploadRate: Int = 0, numPeers: Int = 0, numSeeds: Int = 0)

Properties

Link copied to clipboard

current payload download rate in bytes/sec (download_payload_rate).

Link copied to clipboard

the v1 info-hash identifying the torrent.

Link copied to clipboard

number of connected peers (num_peers).

Link copied to clipboard

number of connected peers that are seeds (num_seeds).

Link copied to clipboard

fraction of wanted data downloaded, 0.0..1.0 (torrent_status::progress).

Link copied to clipboard

the torrent's current state.

Link copied to clipboard

bytes of wanted data downloaded and verified (total_done).

Link copied to clipboard

current payload upload rate in bytes/sec (upload_payload_rate).