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