TrackerEvent

The announce event, porting libtorrent's enum class event_t (tracker_manager.hpp).

The ordinal of each entry is significant: it is exactly the integer libtorrent writes into the BEP-15 announce packet (write_int32(req.event, out)) and the string it maps to in the HTTP &event= query parameter. The values are therefore fixed by the wire protocol: none=0, completed=1, started=2, stopped=3. libtorrent additionally defines paused=4, which it only ever uses internally to tweak request parameters (it is never sent as an event code); we mirror it so the enum is faithful, but the UDP encoder clamps any code it does not recognise to none the way a tracker would interpret an out-of-range value.

Entries

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
val code: Int
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
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.