mirror of
https://github.com/yulinfeng000/blive.git
synced 2024-12-26 12:50:22 +08:00
update protocol
This commit is contained in:
parent
aaee2de166
commit
b75335c306
18
PROTOCOL.md
18
PROTOCOL.md
@ -3,14 +3,14 @@
|
|||||||
## 包格式
|
## 包格式
|
||||||
|
|
||||||
```txt
|
```txt
|
||||||
___________________________________________________________________________
|
____________________________________________________________________________
|
||||||
| | | | | |
|
| | | | | |
|
||||||
| sequence_id | operation | protocol_version | header_size | package_size |
|
| package_size | header_size | protocol_version | operation | sequence_id |
|
||||||
|_____________|___________|__________________|_____________|______________|
|
|______________|_____________|__________________|____________|_____________|
|
||||||
| |
|
| |
|
||||||
| data |
|
| data |
|
||||||
| |
|
| |
|
||||||
|_________________________________________________________________________|
|
|__________________________________________________________________________|
|
||||||
```
|
```
|
||||||
|
|
||||||
包为 byte 数据,由头部和数据组成,字节序均为大端模式
|
包为 byte 数据,由头部和数据组成,字节序均为大端模式
|
||||||
@ -19,7 +19,7 @@ ___________________________________________________________________________
|
|||||||
|
|
||||||
| 偏移量 | 长度 | 含义 |
|
| 偏移量 | 长度 | 含义 |
|
||||||
| ------ | ---- | ------------------------- |
|
| ------ | ---- | ------------------------- |
|
||||||
| 0 | f | 包总大小 package_size |
|
| 0 | 4 | 包总大小 package_size |
|
||||||
| 4 | 2 | 头部大小 header_size |
|
| 4 | 2 | 头部大小 header_size |
|
||||||
| 6 | 2 | 协议版本 protocol_version |
|
| 6 | 2 | 协议版本 protocol_version |
|
||||||
| 8 | 4 | 操作码 operation |
|
| 8 | 4 | 操作码 operation |
|
||||||
|
Loading…
Reference in New Issue
Block a user