TorrentState

The torrent state, ported from libtorrent::torrent_status::state_t (include/libtorrent/torrent_status.hpp). The label strings match the state_str[] table used by state_changed_alert::message().

Note the enum ordinal matters: state_changed_alert::message() indexes state_str[state] by the raw enum value, so the declaration order here is the libtorrent order. (The historical queued_for_checking == 0 slot was removed long ago, so checking_files is value 1, etc.; the printed table still carries the leading "checking (q)" entry, reproduced here.)

Entries

Link copied to clipboard

Queued for checking (legacy slot, value 0).

Link copied to clipboard

Verifying already-downloaded data against piece hashes.

Link copied to clipboard

Downloading the .torrent metadata via the metadata extension.

Link copied to clipboard

Downloading pieces.

Link copied to clipboard

All wanted pieces are present, but not seeding yet.

Link copied to clipboard

Seeding to other peers.

Link copied to clipboard

Allocating files on disk (legacy).

Link copied to clipboard

Resuming a partially-checked torrent.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.