ClientInfo

data class ClientInfo(val name: String, val code: String, val style: ClientStyle, val major: Int, val minor: Int, val revision: Int, val tag: Int)

A decoded peer-id fingerprint: the port of libtorrent's fingerprint struct as produced by parse_az_style / parse_shadow_style / parse_mainline_style.

Constructors

Link copied to clipboard
constructor(name: String, code: String, style: ClientStyle, major: Int, minor: Int, revision: Int, tag: Int)

Properties

Link copied to clipboard

the raw client code that was matched: two characters for Azureus style ("UT"), one character for Shadow / Mainline ("M"). Useful for callers that want the tag rather than the prettified name.

Link copied to clipboard
val major: Int

major version number.

Link copied to clipboard
val minor: Int

minor version number.

Link copied to clipboard

the resolved human client name (e.g. "uTorrent", "libtorrent"). When the two-letter code is not in the table this is the raw one- or two-letter code itself, matching libtorrent's lookup() fallback.

Link copied to clipboard

revision (libtorrent's revision_version).

Link copied to clipboard

which encoding the peer-id matched.

Link copied to clipboard
val tag: Int

build/tag version (libtorrent's tag_version); 0 and not rendered for Shadow / Mainline styles.

Functions

Link copied to clipboard

The libtorrent lookup() display string: "<name> <major>.<minor>.<revision>" with an optional ".<tag>" suffix when tag is non-zero.