RejectRequest

data class RejectRequest(val piece: Int, val begin: Int, val length: Int) : PeerMessage

reject_request (id 16, BEP-6): refuse a Request. Same body as request.

Constructors

Link copied to clipboard
constructor(piece: Int, begin: Int, length: Int)

Properties

Link copied to clipboard
val begin: Int
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 length: Int
Link copied to clipboard
val piece: Int

Functions

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

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