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

Commit

Permalink
修改协议文档
Browse files Browse the repository at this point in the history
  • Loading branch information
zgwit committed Aug 7, 2024
1 parent 88f657a commit 5e94ed3
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions docs/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

| 标识 | 长度(位) | 说明 |
|------|-------|-------|
| 魔术字 | 24 |iot|
| 魔术字 | 24 |rpc|
| 包含数据 | 1 | 0/1 |
| 数据结束 | 1 | 0/1 |
| 数据格式 | 3 | 0-7 |
| 数据格式 | 2 | 0-3 |
| 包类型 | 3 | 0-7 |

### 扩展头 4字节
Expand Down Expand Up @@ -41,15 +41,9 @@
| Binary | 0 | 默认二进制 |
| JSON | 1 | |
| YAML | 2 | |
| XML | 3 | |
| CSV | 4 | 适用于表格形式的数据 |
| MessagePack | 5 | |
| Protobuf | 6 | |
| Reserved | 7 | 保留 |
| MessagePack | 3 | |

数据格式建议使用默认的json格式,方便开发和调试,对于需要省流的场景,可以改进为msgpack或protobuf

protobuf暂不支持,需要定义proto文件
数据格式建议使用默认的json格式,方便开发和调试,对于需要省流的场景,可以改进为msgpack或二进制


## 二、基础交互说明
Expand Down

0 comments on commit 5e94ed3

Please sign in to comment.