MQTT控制报文格式 -- UNSUBACK – 取消主题订阅应答

发布时间 2023-10-17 09:15:29作者: aimigi
  • UNSUBACK 数据包由服务器发送到客户端以确认收到 UNSUBSCRIBE 数据包。
  • 该数据包不包含Payload,所以剩余长度为2,即2字节的可变包头长度。

1. 固定包头 Fixed header

Bit

7

6

5

4

3

2

1

0

byte 1

MQTT Control Packet type (11)

Reserved

 

1

0

1

1

0

0

0

0

byte 2

Remaining Length (2)

 

0

0

0

0

0

0

1

0

2. 可变包头 Variable header

Bit

7

6

5

4

3

2

1

0

byte 1

Packet Identifier MSB

byte 2

Packet Identifier LSB