MQTT Control Packet Types: NameValueDirection of FlowDescription
Reserved0ForbiddenReserved
CONNECT1Client To ServerConnection Request
CONNACK2Server To ClientConnection Acknowledgement
PUBLISH3Client To Server Or Server To ClientPublish Message
PUBACK4Client To Server Or Server To ClientPublish Acknowledgement
PUBREC5Client To Server Or Server To ClientPublish Received
PUBREL6Client To Server Or Server To ClientPublish Release
PUBCOMP7Client To Server Or Server To ClientPublish Complete
SUBSCRIBE8Client To ServerSubscribe Request
SUBACK9Server To ClientSubscribe Acknowledgement
UNSUBSCRIBE10Client To ServerUnsubscribe request
UNSUBACK11Server To ClientUnsubscribe Acknowledgement
PINGREQ12Client To ServerPing Request
PINGRESP13Server To ClientPing Response
DISCONNECT14Client To Server Or Server To ClientDisconnect Notification
AUTH15Client To Server Or Server To ClientAuthentication Exchange
Flag Bit: MQTT Control PacketFixed Header FlagsBit 3Bit 2Bit 1Bit 0
CONNECTReserved0000
CONNACKReserved0000
PUBLISHMQTT v5.0DUPQoS
RETAIN
PUBACKReserved0000
PUBRECReserved0000
PUBRELReserved0000
PUBCOMPReserved0000
SUBSCRIBEReserved0000
SUBACKReserved0000
UNSUBSCRIBEReserved0000
UNSUBACKReserved0000
PINGREQReserved0000
PINGRESPReserved0000
DISCONNECTReserved0000
AUTHReserved0000 可变包头(Variable Header)解析