UtpPacket

class UtpPacket(val header: UtpHeader, val sack: ByteArray?, val payload: ByteArray)

A fully-decoded uTP packet: its header, the optional Selective-ACK bitmask (if the first extension was UtpExtension.SACK), and the payload (bytes after all extension headers).

libtorrent doesn't materialise a struct like this (it walks the extension chain in place inside incoming_packet()), but a value object keeps the Kotlin parser pure and trivially testable.

Constructors

Link copied to clipboard
constructor(header: UtpHeader, sack: ByteArray?, payload: ByteArray)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Raw SACK bitmask bytes, or null if no SACK extension was present.