目录
1 说明...................................................................................................................................................................................3
2 接入流程...........................................................................................................................................................................3
3 Packet 格式说明 ...............................................................................................................................................................4
3.1 Fixed header .............................................................................................................................................................4
3.2 Variable Header &Payload........................................................................................................................................4
4 支持的 packet ...................................................................................................................................................................5
4.1 CONNECT ...........................................................................................................................................................5
4.1.1 Fixed Header.....................................................................................................................................................5
4.1.2 VariableHeader.................................................................................................................................................5
4.1.3 Payload .............................................................................................................................................................6
4.2 CONNACK...........................................................................................................................................................6
4.2.1 Fixed Header.....................................................................................................................................................6
4.2.2 VariableHeader.................................................................................................................................................6
4.3 PUBLISH(client -> server) .............................................................................................................................7
4.3.1 Fixed header .....................................................................................................................................................7
4.3.2 VariableHeader.................................................................................................................................................7
4.3.3 Payload .............................................................................................................................................................8
4.4 PUBLISH(server -> client) .............................................................................................................................8
4.4.1 Fixed header .....................................................................................................................................................8
4.4.2 VariableHeader.................................................................................................................................................8
4.4.3 Payload .............................................................................................................................................................8
4.5 PUBACK..............................................................................................................................................................9
4.4.1 Fixed header .....................................................................................................................................................9
4.4.2 VariableHeader.................................................................................................................................................9
4.6 SUBSCRIBE .........................................................................................................................................................9
4.5.1 Fixed header .....................................................................................................................................................9
4.5.2 VariableHeader.................................................................................................................................................9
4.5.3 Payload .............................................................................................................................................................9
4.7 SUBACK............................................................................................................................................................10
4.6.1 Fixed header ...................................................................................................................................................10
4.6.2 VariableHeader...............................................................................................................................................10
4.6.3 Payload ...........................................................................................................................................................10
4.8 UNSUBSCRIBE ..................................................................................................................................................10
4.7.1 Fixed header ...................................................................................................................................................10
4.7.2 VariableHeader...............................................................................................................................................11
4.7.3 Payload ...........................................................................................................................................................11
4.9 UNSUBACK.................................................................................................................................................................11
4.9.1 Fixed header ...................................................................................................................................................11
4.9.2 VariableHeader...............................................................................................................................................11
5 接入流程.........................................................................................................................................................................12
5.1 连接鉴权 .........................................................................................................................................................12
5.2 消息发布 .........................................................................................................................................................13
评论0