MqttMessage class
Represents an MQTT message that contains a fixed header, variable header and message body.
Messages roughly look as follows.
| Header, 2-5 Bytes Length |
| Variable Header(VH) | | n Bytes Length |
| Message Payload | | 256MB minus VH Size |
- Implementers
- MqttConnectAckMessage
- MqttConnectMessage
- MqttDisconnectMessage
- MqttPingRequestMessage
- MqttPingResponseMessage
- MqttPublishAckMessage
- MqttPublishCompleteMessage
- MqttPublishMessage
- MqttPublishReceivedMessage
- MqttPublishReleaseMessage
- MqttSubscribeAckMessage
- MqttSubscribeMessage
- MqttUnsubscribeAckMessage
- MqttUnsubscribeMessage
Constructors
- MqttMessage()
- Initializes a new instance of the MqttMessage class.
- MqttMessage.fromHeader(MqttHeader header)
- Initializes a new instance of the MqttMessage class.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- header ↔ MqttHeader?
-
The header of the MQTT Message. Contains metadata about the message
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readFrom(
MqttByteBuffer messageStream) → void - Reads a message from the supplied stream.
-
toString(
) → String -
A string representation of this object.
override
-
writeTo(
MqttByteBuffer messageStream) → void - Writes the message to the supplied stream.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
createFrom(
MqttByteBuffer messageStream) → MqttMessage - Creates a new instance of an MQTT Message based on a raw message stream.