writeTo method
Writes the message to the supplied stream.
Implementation
@override
void writeTo(MqttByteBuffer messageStream) {
final variableHeaderLength = variableHeader!.getWriteLength();
final payloadLength = payload.getWriteLength();
header!.writeTo(variableHeaderLength + payloadLength, messageStream);
variableHeader!.writeTo(messageStream);
payload.writeTo(messageStream);
}