Reply

sealed class Reply

The typed contents of a response's r dictionary, minus the always-present id.

Inheritors

Types

Link copied to clipboard
class Item(val token: ByteArray?, val item: DhtItem? = null, val nodes: List<CompactNode> = emptyList(), val nodes6: List<CompactNode> = emptyList(), val seq: Long? = null) : DhtMessage.Reply

get reply: r{token, nodes?, nodes6?, seq?, v?, k?, sig?} (BEP-44). When the responder has the item it includes item (immutable or mutable, reconstructed here, and for a mutable item signature-verified). Otherwise the reply carries only the token and closer nodes.

Link copied to clipboard
class Nodes(val nodes: List<CompactNode> = emptyList(), val nodes6: List<CompactNode> = emptyList()) : DhtMessage.Reply

find_node / generic node reply: r{nodes, nodes6}. The compact node lists are decoded into nodes (from nodes) and nodes6 (from nodes6).

Link copied to clipboard
class Peers(val token: ByteArray?, val values: List<DhtEndpoint> = emptyList(), val nodes: List<CompactNode> = emptyList(), val nodes6: List<CompactNode> = emptyList()) : DhtMessage.Reply

get_peers reply: r{token, values?, nodes?, nodes6?}. values holds the peer endpoints from the values list. token is the opaque write token to present on a subsequent announce_peer.

Link copied to clipboard

A bare response carrying only id: what ping (and announce_peer) reply with.