This commit is contained in:
laodaming
2023-10-20 15:14:41 +08:00
parent 6a9bfa0ef0
commit 6c341590ee
6 changed files with 26 additions and 18 deletions

View File

@@ -21,6 +21,9 @@ service websocket {
//关闭某个连接
@handler CloseWebsocketHandler
post /api/websocket/close_websocket(CloseWebsocketReq) returns (response);
//获取ws统计信息
@handler GetStatHandler
post /api/websocket/get_stat(GetStatReq) returns (response);
}
//websocket数据交互[
@@ -46,4 +49,12 @@ type CommonNotifyReq {
//关闭连接
type CloseWebsocketReq {
Wid string `json:"wid"`
}
//获取ws统计信息
type GetStatReq {
Password string `form:"password"`
}
type GetStatRsp {
WsTotalCount int `json:"ws_total_count"` //ws连接数
CurRequestCombineCount int `json:"cur_request_combine_count"`
}