GitBook: [#6] No subject

This commit is contained in:
李文超
2022-07-07 06:40:45 +00:00
committed by gitbook-bot
parent 86e18b1904
commit d63a37cc32
2 changed files with 13 additions and 0 deletions
+1
View File
@@ -5,3 +5,4 @@
* [开发](dev/README.md)
* [S1 - 代码结构](dev/s1-dai-ma-jie-gou.md)
* [S2 - 通信协议](dev/s2-tong-xin-xie-yi.md)
* [S3 - shell](dev/s3-shell.md)
+12
View File
@@ -0,0 +1,12 @@
# S3 - shell
shell功能的主要流程如下:
1. 当用户点击终端页面的连接按钮后,会调用`/new`接口创建一个到远端的连接
2. 在`/new`接口中会优先发送一个connect\_req消息来创建一个shell的连接
3. 等待远端返回connect\_rep消息,若连接创建成功则返回该链接的ID
4. 创建`/ws/<linkid>`的websocket连接
5. 调用`/resize`接口调整pty设备的大小
6. 开始转发数据