Decodes Mqtt messages from bytes, following
the MQTT protocol specification
v3.1
or
v5.0, depending on the
version specified in the CONNECT message that first goes through the channel.
Encodes Mqtt messages into bytes following the protocol specification v3.1
as described here MQTTV3.1
or v5.0 as described here MQTTv5.0 -
depending on the version specified in the first CONNECT message that goes through the channel.