本篇文档简单描述MQTT中几类常用消息的交互过程。
1、Ping
Client Server
send Ping ---> handle_ping
handle_pingresponse <--- send ping response
2、Connect
Client Server
send Connect ---> handle_Connect
handle_ConnAck <--- send ConnAck
3、Subscribe
Client Server
send Subscribe ---> handle_Subscribe
4、Publish
Qos = 0
Client Server
send Publish ---> handle_Publish
Qos = 1
Client Server
send Publish ---> handle_Publish
handle_PubAck <--- send PubAck
Qos = 2
Client Server
send Publish ---> handle_Publish
handle_PubRec <--- send PubRec
send PubRel ---> handle_pubRel
handle_PubComp <--- send PubComp
5、UnSubscribe
略