docs: 协议表补充 msgType=9 会话配置帧
- README §4.4.1 增加 msg_type 9 与 payload 字段说明 - AGENTS.md 的 msgType 约定同步到 9
This commit is contained in:
1 parent
59b3cefb97
commit
5f9fe88e37
2 files changed
+7
-2
No files matched your search
@@ -164,7 +164,7 @@ sig=<信令服务器URL,可选>
|
||||
struct ControlFrameHeader {
|
||||
u8 version; // 当前 = 1
|
||||
u8 msg_type; // 0=touch 1=mouse 2=key 3=wheel 4=clipboard 5=ping 6=pong
|
||||
// 7=file(JSON 子协议) 8=mirror(投屏请求/应答)
|
||||
// 7=file(JSON 子协议) 8=mirror(投屏请求/应答) 9=sessionConfig(会话配置)
|
||||
u16 sequence; // 递增序号,用于去重/重传
|
||||
u32 payload_len; // 负载长度(不包括头部)
|
||||
};
|
||||
@@ -204,6 +204,11 @@ struct MirrorEvent {
|
||||
u8 action; // 0=request 1=stop 2=granted 3=denied 4=stopped 5=error
|
||||
u8 message[]; // 可选,UTF-8 原因说明(denied/error 时)
|
||||
};
|
||||
|
||||
// 会话配置(msg_type = 9):主控端在请求投屏之前下发,payload 为 UTF-8 JSON,字段全部可选
|
||||
// {"preferH265":false,"bitrateMbps":8,"audioEnabled":true,"clipboardSync":true}
|
||||
// 被控端缺省字段沿用当前值;投屏中改编码格式/码率会重建采集链路,
|
||||
// audioEnabled=false 时不建音频采集,clipboardSync=false 时双向丢弃剪贴板内容。
|
||||
```
|
||||
|
||||
#### 4.4.2 序列化/反序列化抽象接口
|
||||
|
||||
Reference in new issue
Block a user