docs: designed interact

This commit is contained in:
2023-12-15 02:13:23 +00:00
parent b8e7cda86e
commit 6a1f63e780

View File

@ -68,13 +68,13 @@ memoryriver类维护一个缓存简单地缓存高频访问和连续访问
## server模式下的前后端交互格式
### 前端向后端
- `#OpenSession [TempChannelID]`:向调度模块申请一个新会话
- `#CloseSession [SessionToken] [OuthenticationKey]`:显示地告知调度模块停止某个会话
- `#_Request [SessionToken] [OperationToken] [OuthenticationKey]`:向服务端重新请求调取某次操作响应的缓存
- `#CloseSession [SessionToken] [OperationToken] [OuthenticationKey]`:显示地告知调度模块停止某个会话
- `#Request [SessionToken] [OperationToken] [OuthenticationKey] [UserCommand]`:向后端发送一个请求
- `#Who [SessionToken] [OperationToken] [OuthenticationKey]`:查询自己是谁和权限
- `#ShutDownSystem`:关闭整个系统
### 后端向前端
- 字符串,`[SessionToken] [OperationToken] [LineCounter]\n[ResponseContent]`,其中,`[ResponseContent]`恰有`[LineCounter]`行,每行行末有且仅有一个`\n`。输出为空通过把`[LineCounter]`设置为0来实现
- 字符串,`[SessionToken] [OperationToken] [LineCounter]\n[ResponseContent]`,其中,`[ResponseContent]`恰有`[LineCounter]`行,每行行末有且仅有一个`\n`。输出为空通过把`[LineCounter]`设置为0来实现,若对话验证失败,`[LineCounter]`设为-1
## 向用户提供的命令
- `quit``exit`:正常退出系统