HashReject

data class HashReject(val piecesRoot: ByteArray, val baseLayer: Int, val index: Int, val length: Int, val proofLayers: Int) : PeerMessage

hash_reject (id 23, BEP-52): refuse a HashRequest. The payload is the identical 48-byte header as HashRequest, with no trailing hashes. On the wire: [len=49][23][header]. Mirrors write_hash_reject / on_hash_reject.

Constructors

Link copied to clipboard
constructor(piecesRoot: ByteArray, baseLayer: Int, index: Int, length: Int, proofLayers: Int)

Properties

Link copied to clipboard
Link copied to clipboard
open override val id: Int

The numeric message id, or -1 for KeepAlive (which has no id byte on the wire). Matches bt_peer_connection::message_type.

Link copied to clipboard
val index: Int
Link copied to clipboard
val length: Int
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun encode(): ByteArray

The full on-the-wire frame: 4-byte big-endian length prefix + id + payload.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String