BlockOption

class BlockOption(val number: Long, val more: Boolean, val sizeExponent: Int)(source)

The value of a Block1 or Block2 option (RFC 7959 §2.2): block number, more flag and size exponent. Size exponent 7 is BERT, defined only for reliable transports (RFC 8323 §6).

Constructors

Link copied to clipboard
constructor(number: Long, more: Boolean, sizeExponent: Int)

Types

Link copied to clipboard
object Companion

Properties

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

Byte offset of this block in the whole body.

Link copied to clipboard
val size: Int

Block size in bytes: 16 to 1024; BERT blocks are counted in units of 1024 bytes.

Link copied to clipboard

Functions

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
Link copied to clipboard
fun toUint(): Long

The option value as an unsigned integer.