Message Header
IOTMP Message Header
The header is the mandatory first part of every IOTMP message. It provides the essential metadata required to parse the message:
Message Type – identifies the purpose of the message.
Message Size – defines the length of the message body in bytes (excluding the header).
The header is encoded using varint fields, resulting in a minimum size of 2 bytes.
Message Type
The Message Type field identifies the purpose of the IOTMP message. It is always present in the header and is encoded as a varint.
Message types define the control flow of the protocol, covering actions such as connection management, resource execution, error handling, and data streaming.
The protocol reserves specific numeric values for core operations, while leaving others available for future extensions. This ensures both compatibility and extensibility as new functionality is introduced.
The currently defined message types are:
Reserved
0x00
Reserved field, not used
Message Size
The Message Size field specifies the length of the message body, expressed in bytes. It does not include the size of the header itself.
Encoded as a varint.
Always present in the message header.
A value of 0 indicates that the message has no body (only a header).
This field enables the receiver to determine exactly how many bytes to read for the payload and when a message is complete.
Last updated
Was this helpful?