Package-level declarations
Types
Posted every time a torrent is successfully added (or fails to be added), carrying the result of the add operation. Ported from libtorrent::add_torrent_alert (alert_type 67).
Alert category bitmask, ported from libtorrent::alert_category together with the alert::*_notification static constants (include/libtorrent/alert.hpp).
Generated when a block request receives a response (the block finished downloading from this peer). Ported from libtorrent::block_finished_alert (alert_type 30). Extends PeerAlert.
Generated when a DHT node announces to an info-hash on our DHT node. Ported from libtorrent::dht_announce_alert (alert_type 55).
Posted when the initial DHT bootstrap is done. Ported from libtorrent::dht_bootstrap_alert (alert_type 62). Carries no payload.
Generated when a DHT node sends a get_peers message to our DHT node. Ported from libtorrent::dht_get_peers_alert (alert_type 56).
Generated each time the DHT returns peers for a torrent. Ported from libtorrent::dht_reply_alert (alert_type 16). In libtorrent this derives from tracker_alert but is constructed with an empty URL and endpoint, and its message() omits the version/url, rendering only <prefix> received DHT peers: <n>.
Posted when libtorrent learns its external IP address (from a tracker or a peer supporting the extension protocol). Ported from libtorrent::external_ip_alert (alert_type 47).
Generated when a fast-resume file is passed to add_torrent() but the on-disk files do not match it. Ported from libtorrent::fastresume_rejected_alert (alert_type 53).
Posted when an individual file completes downloading (all overlapping pieces have passed their hash check). Ported from libtorrent::file_completed_alert (alert_type 6).
Generated when the storage fails to read or write a file; the torrent is paused. Ported from libtorrent::file_error_alert (alert_type 43).
Posted in response to rename_file() when the rename succeeds. Ported from libtorrent::file_renamed_alert (alert_type 7).
Posted in response to rename_file() when the rename fails. Ported from libtorrent::file_rename_failed_alert (alert_type 8).
Generated when a finished piece fails its hash check. Ported from libtorrent::hash_failed_alert (alert_type 18).
Posted every time an incoming connection is accepted (through any means). Ported from libtorrent::incoming_connection_alert (alert_type 66).
Posted when none of the ports in the listen range could be opened. Ported from libtorrent::listen_failed_alert (alert_type 48). Non-discardable.
Posted when the listen port succeeds to be opened on an interface. Ported from libtorrent::listen_succeeded_alert (alert_type 49). Non-discardable.
Generated when received metadata fails to match the info-hash (corrupt metadata); libtorrent retries automatically. Ported from libtorrent::metadata_failed_alert (alert_type 44).
Generated when metadata has been fully received and can start downloading. Only fires for torrents that fetch metadata from peers. Ported from libtorrent::metadata_received_alert (alert_type 45).
Base class for alerts referring to a specific peer, ported from libtorrent::peer_alert (include/libtorrent/alert_types.hpp).
Generated when a peer is banned for sending too many corrupt pieces. Ported from libtorrent::peer_ban_alert (alert_type 19).
Posted when an incoming peer (or one about to be added) is blocked, e.g. by the IP/port filter or protocol restrictions. Ported from libtorrent::peer_blocked_alert (alert_type 54). In libtorrent the peer id is always null for this alert.
The reason a peer was blocked, ported from libtorrent::peer_blocked_alert::reason_t. The label strings are the reason_str[] table from peer_blocked_alert::message().
Posted when an incoming connection passes the handshake and is associated with a torrent, or an outgoing connection attempt succeeds. Ported from libtorrent::peer_connect_alert (alert_type 23).
The direction of a peer connection, ported from libtorrent::peer_connect_alert::direction_t. Rendered as "incoming" / "outgoing" by peer_connect_alert::message().
Generated when a peer is disconnected for any reason not covered by PeerErrorAlert. Ported from libtorrent::peer_disconnected_alert (alert_type 24).
Generated when a peer sends invalid data over the peer protocol and is disconnected. Ported from libtorrent::peer_error_alert (alert_type 22).
Generated when a peer is snubbed, because it stopped sending data we requested. Ported from libtorrent::peer_snubbed_alert (alert_type 21).
Generated when a snubbed peer starts sending data again. Ported from libtorrent::peer_unsnubbed_alert (alert_type 20).
Generated when a limit is reached that may hurt upload/download performance. Ported from libtorrent::performance_alert (alert_type 9).
Performance-warning codes, ported from libtorrent::performance_alert::performance_warning_t. The label strings are the warning_str[] table from performance_warning_str() in src/alert.cpp.
Posted every time a piece completes downloading and passes the hash check. Ported from libtorrent::piece_finished_alert (alert_type 27).
The BitTorrent protocol version carried by tracker alerts, ported from libtorrent::protocol_version (include/libtorrent/info_hash.hpp). libtorrent renders it as the literal "v1" or "v2" inside several tracker message()s.
Posted in response to read_piece() once the asynchronous read completes. Ported from libtorrent::read_piece_alert (alert_type 5). Non-discardable.
Generated as a response to save_resume_data() once the resume state has been written. Ported from libtorrent::save_resume_data_alert (alert_type 37).
Generated instead of SaveResumeDataAlert when resume-data generation failed. Ported from libtorrent::save_resume_data_failed_alert (alert_type 38).
Generated when a scrape request fails (tracker timeout, refused connection or an HTTP error response). Ported from libtorrent::scrape_failed_alert (alert_type 14). Non-discardable.
Generated when a scrape request to a tracker succeeds. Ported from libtorrent::scrape_reply_alert (alert_type 13). Non-discardable.
Posted as a response to post_session_stats(). Carries a snapshot of all the session-wide counters. Ported from libtorrent::session_stats_alert (alert_type 70). Non-discardable.
Generated whenever a torrent changes its state. Ported from libtorrent::state_changed_alert (alert_type 10).
Posted in response to post_torrent_updates(), carrying the status of every torrent that changed since the last such post. Ported from libtorrent::state_update_alert (alert_type 68). Not subject to alert-mask filtering (it is only ever posted on request).
Generated when all disk IO has completed and a torrent's files have been moved (after move_storage()). Ported from libtorrent::storage_moved_alert (alert_type 33).
Generated when an attempt to move a torrent's storage fails. Ported from libtorrent::storage_moved_failed_alert (alert_type 34).
Base class for alerts associated with a specific torrent, ported from libtorrent::torrent_alert (include/libtorrent/alert_types.hpp).
Posted when a torrent finishes checking and is ready to start downloading. Ported from libtorrent::torrent_checked_alert (alert_type 41).
Generated when a request to delete a torrent's files completes. Ported from libtorrent::torrent_deleted_alert (alert_type 35).
Generated when a request to delete a torrent's files fails. Ported from libtorrent::torrent_delete_failed_alert (alert_type 36).
Posted whenever a torrent is transitioned into the error state. Ported from libtorrent::torrent_error_alert (alert_type 64).
Posted when a torrent transitions from downloader to seed. Generated at most once per torrent. Ported from libtorrent::torrent_finished_alert (alert_type 26).
Generated as a response to pause() once all disk IO is complete and files are closed. Ported from libtorrent::torrent_paused_alert (alert_type 39).
Posted whenever a torrent is removed. The torrent handle is usually already invalid, so the info-hash identifies it. Ported from libtorrent::torrent_removed_alert (alert_type 4).
Generated as a response to resume() when a torrent goes from paused to active. Ported from libtorrent::torrent_resumed_alert (alert_type 40).
The torrent state, ported from libtorrent::torrent_status::state_t (include/libtorrent/torrent_status.hpp). The label strings match the state_str[] table used by state_changed_alert::message().
A minimal snapshot of a torrent's runtime state, the pure-Kotlin stand-in for the slice of libtorrent::torrent_status (include/libtorrent/torrent_status.hpp) that StateUpdateAlert carries. Only the headline fields clients typically poll are modelled; the full C++ struct has many more.
Base class for alerts associated with a specific tracker, ported from libtorrent::tracker_alert (include/libtorrent/alert_types.hpp). Derives from TorrentAlert because a tracker is always tied to a torrent.
Generated each time a tracker announce is sent (or attempted). Ported from libtorrent::tracker_announce_alert (alert_type 17).
Generated on tracker timeouts, premature disconnects, invalid responses or a non-200 OK HTTP response. Ported from libtorrent::tracker_error_alert (alert_type 11).
The tracker announce event, ported from libtorrent::event_t (include/libtorrent/tracker_manager.hpp). The label strings match the event_str[] table used by tracker_announce_alert::message().
Informational alert generated when a tracker announce succeeds (UDP, HTTP or DHT). Ported from libtorrent::tracker_reply_alert (alert_type 15).
Triggered when the tracker reply contains a warning field. The announce usually succeeded but the tracker has a message for the client. Ported from libtorrent::tracker_warning_alert (alert_type 12).
Posted on a UDP socket error (uTP, DHT and UDP-tracker traffic is global to the session). Ported from libtorrent::udp_error_alert (alert_type 46).
Generated when an HTTP/web-seed name lookup or request fails. Ported from libtorrent::url_seed_alert (alert_type 42).