websocket 整合

This commit is contained in:
张良(004796)
2023-12-29 18:17:27 +08:00
parent 3888da346c
commit 0ee961e550
46 changed files with 366 additions and 223 deletions

View File

@@ -0,0 +1,32 @@
package com.ruoyi.cai.ws.constant;
/**
* websocket的常量配置
*
* @author zendwang
*/
public interface WebSocketConstants {
/**
* websocketSession中的参数的key
*/
String TOKEN = "token";
String ROOM_ID = "roomId";
String USER_ID = "userId";
/**
* 订阅的频道
*/
String WEB_SOCKET_TOPIC = "global:websocket";
/**
* 前端心跳检查的命令
*/
String PING = "ping";
/**
* 服务端心跳恢复的字符串
*/
String PONG = "pong";
}