UtpHeader
A parsed/parseable uTP header: the faithful Kotlin analogue of libtorrent's struct utp_header (include/libtorrent/aux_/utp_stream.hpp).
libtorrent stores each field in a big_endian_int, which casts a raw network buffer in place; here we hold host-order values and (de)serialise explicitly in encode/decode. All wrap-around-counter fields (seqNr, ackNr, connectionId) are kept as 16-bit unsigned values in an Int; the 32-bit fields (timestampMicros, timestampDiffMicros, wndSize) likewise use a Long so the unsigned range survives. Producing the on-wire bytes only ever uses the low 16/32 bits, so over-large values truncate exactly as the C++ does.
Constructors
Properties
16-bit connection id (send_id for non-SYN, recv_id for ST_SYN).
First extension chain id (0 == none). See UtpExtension.
Difference between our recv time and their send time; 0 == no sample yet.
Sender's clock in microseconds (32-bit, may be a synthetic counter).