feat: ws模块新增ssh和telnet类型连接

This commit is contained in:
TsMask
2024-02-26 12:02:19 +08:00
parent af93652e3d
commit 299eb9d24a
7 changed files with 273 additions and 19 deletions

View File

@@ -4,13 +4,14 @@ import "github.com/gorilla/websocket"
// WSClient ws客户端
type WSClient struct {
ID string // 连接ID-随机字符串16位
ID string // 客户端连接ID-随机字符串16位
Conn *websocket.Conn // 连接实例
LastHeartbeat int64 // 最近一次心跳消息(毫秒)
BindUid string // 绑定登录用户ID
SubGroup []string // 订阅组ID
MsgChan chan []byte // 消息通道
StopChan chan struct{} // 停止信号-退出协程
ChildConn any // 子连接实例-携带某种连接会话
}
// WSRequest ws消息接收