writeMqttString static method
Writes an MQTT string. stringStream - The stream containing the string to write. stringToWrite - The string to write.
Implementation
static void writeMqttString(
MqttByteBuffer stringStream, String stringToWrite) {
final enc = MqttEncoding();
final stringBytes = enc.getBytes(stringToWrite);
stringStream.write(stringBytes);
}