Unknown

data class Unknown(val id: Int, val payload: ByteArray) : PeerMessage

A frame whose message id is not one this codec recognises. libtorrent would route this to a peer-plugin or drop the connection; we surface it so the caller can decide. id is the raw id byte, payload is everything after it.

Constructors

Link copied to clipboard
constructor(id: Int, payload: ByteArray)

Properties

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

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