TrackerKey

object TrackerKey

The per-torrent &key= value libtorrent threads into every announce (torrent::tracker_key()), a stable 32-bit identifier the tracker uses to recognise us across IP changes. libtorrent derives it deterministically from object addresses; that is impossible (and pointless) on KMP, so we generate a random 32-bit value once per torrent and reuse it. The wire semantics are identical: the same opaque key travels on every announce for this torrent. The old default of 0 is replaced by generate.

Functions

Link copied to clipboard
fun generate(random: Random = Random.Default): Int

Draw a fresh random 32-bit announce key for a torrent.