ScrapeReplyAlert

data class ScrapeReplyAlert(val torrentName: String?, val trackerUrl: String, val localEndpoint: String, val incomplete: Int, val complete: Int, val version: ProtocolVersion = ProtocolVersion.V1) : TrackerAlert

Generated when a scrape request to a tracker succeeds. Ported from libtorrent::scrape_reply_alert (alert_type 13). Non-discardable.

libtorrent renders <tracker-prefix> <v1|v2> scrape reply: <incomplete> <complete> (note: incomplete is printed before complete). Either count may be -1 if the tracker's response was malformed.

Constructors

Link copied to clipboard
constructor(torrentName: String?, trackerUrl: String, localEndpoint: String, incomplete: Int, complete: Int, version: ProtocolVersion = ProtocolVersion.V1)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val category: Int

The bitmask of AlertCategory flags this alert belongs to. Mirrors alert::category(), which returns the concrete alert's static_category.

Link copied to clipboard

number of seeds reported, or -1 if unknown.

Link copied to clipboard

number of non-seed peers (leechers) reported, or -1 if unknown.

Link copied to clipboard
open override val localEndpoint: String

the local listen interface endpoint, already formatted.

Link copied to clipboard
open override val torrentName: String?

the torrent's name, or null when the handle would be invalid (rendered as " - ", matching libtorrent).

Link copied to clipboard
open override val trackerUrl: String

the tracker URL being announced to.

Link copied to clipboard
open override val type: Int

An integer unique to this alert type, matching the C++ alert_type static constant. It can be compared against a concrete alert's ALERT_TYPE to determine the runtime type. Mirrors alert::type().

Link copied to clipboard

the BitTorrent protocol version that was scraped.

Link copied to clipboard
open override val what: String

A short string literal naming the alert type (e.g. "torrent_finished"). It carries no bundled information. Mirrors alert::what(), which in libtorrent returns alert_name(alert_type).

Functions

Link copied to clipboard
open override fun message(): String

A string describing the alert and the information bundled with it. Intended for debugging/development, not localization. Mirrors alert::message().