2023-07-24 11:44:28 +00:00
|
|
|
|
package constants
|
|
|
|
|
|
2023-08-23 07:08:45 +00:00
|
|
|
|
type Websocket string
|
2023-07-24 11:44:28 +00:00
|
|
|
|
|
2023-08-30 08:53:55 +00:00
|
|
|
|
// websocket消息类型(主类别)
|
2023-07-24 11:44:28 +00:00
|
|
|
|
const (
|
2023-10-11 09:50:08 +00:00
|
|
|
|
WEBSOCKET_UNAUTH Websocket = "WEBSOCKET_UNAUTH" //鉴权失败 (1级消息,单向通信)
|
|
|
|
|
WEBSOCKET_CONNECT_ERR Websocket = "WEBSOCKET_CONNECT_ERR" //ws连接错误 (1级消息,单向通信)
|
|
|
|
|
WEBSOCKET_CONNECT_SUCCESS Websocket = "WEBSOCKET_CONNECT_SUCCESS" //ws连接成功 (1级消息,单向通信)
|
2023-08-30 08:53:55 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// websocket消息类型(通用通知类别)
|
|
|
|
|
const (
|
2023-08-30 09:00:30 +00:00
|
|
|
|
WEBSOCKET_COMMON_NOTIFY Websocket = "WEBSOCKET_COMMON_NOTIFY" //通用回调通知(1级消息,单向通信)
|
2023-08-30 08:53:55 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// websocket消息类型(基本传输结构类别)
|
|
|
|
|
const (
|
2023-08-30 09:00:30 +00:00
|
|
|
|
WEBSOCKET_ERR_DATA_FORMAT Websocket = "WEBSOCKET_ERR_DATA_FORMAT" //传入数据格式错误(1级消息,单向通信)
|
2023-08-30 08:53:55 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// websocket消息类型(云渲染类别)
|
|
|
|
|
const (
|
2023-08-31 02:04:03 +00:00
|
|
|
|
WEBSOCKET_RENDER_IMAGE Websocket = "WEBSOCKET_RENDER_IMAGE" //图片渲染消息(1级消息,双向通信)
|
|
|
|
|
WEBSOCKET_RENDER_IMAGE_ERR Websocket = "WEBSOCKET_RENDER_IMAGE_ERR" //图片渲染失败消息(1级消息,单向通信)
|
|
|
|
|
WEBSOCKET_COMBINE_IMAGE Websocket = "WEBSOCKET_COMBINE_IMAGE" //反回合成刀版图消息(2级消息,单向通信,属于 WEBSOCKET_RENDER_IMAGE 消息的子流程)
|
2023-08-31 02:15:43 +00:00
|
|
|
|
WEBSOCKET_ASSEMBLE_RENDER_DATA Websocket = "WEBSOCKET_ASSEMBLE_RENDER_DATA" //组装unity需要的数据 (2级消息,单向通信,属于 WEBSOCKET_RENDER_IMAGE 消息的子流程)
|
|
|
|
|
WEBSOCKET_SEND_DATA_TO_UNITY Websocket = "WEBSOCKET_SEND_DATA_TO_UNITY" //发送到unity进行渲染 (2级消息,单向通信,属于 WEBSOCKET_RENDER_IMAGE 消息的子流程)
|
2023-07-24 11:44:28 +00:00
|
|
|
|
)
|
2023-08-31 06:38:34 +00:00
|
|
|
|
|
|
|
|
|
// websocket消息类型(系统数据变更通知)
|
|
|
|
|
const (
|
|
|
|
|
WEBSOCKET_SYSTEM_DATA_UPDATE_NOTIFY Websocket = "WEBSOCKET_SYSTEM_DATA_UPDATE_NOTIFY" //系统数据更新(1级消息,单向通信)
|
|
|
|
|
)
|