MQTT控制报文格式 -- PUBACK(Publish Acknowledgement) Publish消息应答
该消息是接收方收到 QoS 1 的PUBLISH 消息后,返回给发送方的应答消息。
该消息由于没有Payload,固定包头的剩余长度值为 2
1. 固定包头 Fixed Header
Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
byte 1 |
MQTT Control Packet type (4) |
Reserved |
||||||
|
0 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
byte 2 |
Remaining Length (2) |
|||||||
|
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
2. 可变包头
Bit |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
byte 1 |
Packet Identifier MSB |
|||||||
byte 2 |
Packet Identifier LSB |