This commit is contained in:
laodaming
2023-07-26 11:53:06 +08:00
parent e05fcd8248
commit 999dc36e76
6 changed files with 300 additions and 344 deletions

View File

@@ -11,18 +11,14 @@ import "basic.api"
service websocket {
//websocket数据交互
@handler DataTransferHandler
get /api/websocket/data_transfer(DataTransferReq) returns (response);
get /api/websocket/data_transfer(request) returns (response);
//渲染完了通知接口
@handler RenderNotifyHandler
post /api/websocket/render_notify(RenderNotifyReq) returns (response);
}
//websocket数据交互
type DataTransferReq {
T string `json:"t"` //消息类型
D string `json:"d"` //传递的消息
}
type DataTransferRsp {
type DataTransferData {
T string `json:"t"` //消息类型
D string `json:"d"` //传递的消息
}