Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zgwit authored Aug 4, 2024
1 parent 0c09095 commit 3e3efcd
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,33 @@

| 标识 | 长度(位) | 说明 |
|----|----|----|
| 魔术字 | 16 | 0x1234 |
| 包类型 | 4 | 1-15 |
| 魔术字 | 24 | “iot” |
| 包含数据 | 1 | 0-1 |
| 数据格式 | 3 | 0-7 |
| [数据长度] | 20 | 0- 1MB |
| 包类型 | 4 | 1-15 |
| [事务序号] | 16 | 0-65535 |
| [数据长度] | 16 | 0-64KB |


### 包类型

| 类型 | id | 说明 |
|----|----|----|
| - | 0 | 无效 |
| CONNECT | 1 | 连接 |
| CONNECT_ACK | 2 | 连接响应 |
| CONNACK | 2 | 连接响应 |
| HEARTBEAT | 3 | 心跳 |
| PING | 4 | ping |
| PONG | 5 | ping响应 |
| REQUEST | 6 | 请求 |
| RESPONSE | 7 | 响应 |
| STREAM | 8 | 数据流 |
| STREAM_END | 9 | 数据流结束 |
| | 10 | |
| | 11 | |
| | 12 | |
| | 13 | |
| | 14 | |
| PUBLISH | 10 | 广播 |
| PUBACK | 11 | 广播响应 |
| SUBSCRIBE | 12 | 订阅 |
| SUBACK | 13 | 订阅响应 |
| UNSUBSCRIBE | 14 | 取消订阅 |
| DISCONNECT | 15 | 断开连接 |

### 数据格式
Expand Down

0 comments on commit 3e3efcd

Please sign in to comment.