token

open override val token: Long

Per RFC 7252 2.2. Request/Response Model:

A Token is used to match responses to requests independently from the underlying messages.

A token may be 0-8 bytes, whereas token is represented as a Long. The following ranges outline the number of bytes that will be occupied when encoded as CoAP.

RangeBytes
-2^63 .. -18
1 .. 2551
256 .. 65,6352
65,536 .. 4,294,967,2954
4,294,967,296 .. 2^63-18

A token of value 0 will occupy 0 bytes.