2023-10-11 10:06:40 +00:00
|
|
|
package websocket_data
|
|
|
|
|
2023-10-18 09:39:31 +00:00
|
|
|
import "fusenapi/constants"
|
|
|
|
|
|
|
|
// websocket数据交互基本数据类型
|
|
|
|
type DataTransferData struct {
|
|
|
|
T constants.Websocket `json:"t"` //消息类型
|
|
|
|
D interface{} `json:"d"` //传递的消息
|
|
|
|
Debug bool `json:"debug"` //是否开启debug
|
|
|
|
}
|
|
|
|
|
2023-10-11 10:06:40 +00:00
|
|
|
// 基础连接成功返回
|
|
|
|
type ConnectSuccessMsg struct {
|
2023-10-18 09:39:31 +00:00
|
|
|
Wid string `json:"wid"` //websocket连接唯一标识
|
2023-10-11 10:06:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// 连接失败
|
|
|
|
type ConnectErrMsg struct {
|
|
|
|
Message string `json:"message"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// 未授权
|
|
|
|
type ConnectUnAuth struct {
|
|
|
|
Message string `json:"message"`
|
|
|
|
}
|