token
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.
Range | Bytes |
---|---|
-2^63 .. -1 | 8 |
1 .. 255 | 1 |
256 .. 65,635 | 2 |
65,536 .. 4,294,967,295 | 4 |
4,294,967,296 .. 2^63-1 | 8 |
A token of value 0
will occupy 0
bytes.