This commit is contained in:
laodaming 2023-10-18 14:37:18 +08:00
parent 4b7f920b5a
commit 57e6b0227f
2 changed files with 6 additions and 6 deletions

View File

@ -452,9 +452,9 @@ func (w *wsConnectItem) sendToInChan(data []byte) {
// 格式化为websocket标准返回格式
func (w *wsConnectItem) respondDataFormat(msgType constants.Websocket, data interface{}) []byte {
d := websocket_data.DataTransferData{
T: msgType,
D: data,
OpenDebug: w.debug != nil,
T: msgType,
D: data,
Debug: w.debug != nil,
}
b, _ := json.Marshal(d)
return b

View File

@ -4,9 +4,9 @@ import "fusenapi/constants"
// websocket数据交互基本数据类型
type DataTransferData struct {
T constants.Websocket `json:"t"` //消息类型
D interface{} `json:"d"` //传递的消息
OpenDebug bool `json:"open_debug"` //是否开启debug
T constants.Websocket `json:"t"` //消息类型
D interface{} `json:"d"` //传递的消息
Debug bool `json:"debug"` //是否开启debug
}
// websocket接受要云渲染处理的数据