BlockState
The four states a single block can be in. This is a pure-Kotlin port of the anonymous enum inside libtorrent's piece_picker::block_info (include/libtorrent/piece_picker.hpp).
State flows strictly forward during a healthy download: NONE โ REQUESTED โ WRITING โ FINISHED. A block may also jump straight from NONE to WRITING or FINISHED (e.g. resume data, or a peer that hands us a whole block at once), and may fall back to NONE on abort / write-failure.
Properties
Functions
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.)
Returns an array containing the constants of this enum type, in the order they're declared.