The Server MUST respond to the CONNECT Packet with a CONNACK return code 0x01 (unacceptable protocol level) and then disconnect the Client if the Protocol Level is not supported by the Server [MQTT-3.1.2-2].
That means, the Parser should parse the CONNECT packet successfuly and save protocol level. However, there is no field to store protocol level in ConnectPacket.
The scope of the issue is to add the field to ConnectPacket and modify Encoder to properly encode it.
From the spec:
That means, the Parser should parse the CONNECT packet successfuly and save protocol level. However, there is no field to store protocol level in
ConnectPacket
.The scope of the issue is to add the field to
ConnectPacket
and modifyEncoder
to properly encode it.