日志更新
This commit is contained in:
@@ -77,7 +77,6 @@ public class WebSocketServer {
|
|||||||
* @param message 客户端发送过来的消息*/
|
* @param message 客户端发送过来的消息*/
|
||||||
@OnMessage
|
@OnMessage
|
||||||
public void onMessage(String message, Session session) {
|
public void onMessage(String message, Session session) {
|
||||||
log.info("收到来"+sid+"的信息:"+message);
|
|
||||||
//群发消息
|
//群发消息
|
||||||
for (WebSocketServer item : webSocketSet) {
|
for (WebSocketServer item : webSocketSet) {
|
||||||
try {
|
try {
|
||||||
@@ -106,7 +105,6 @@ public class WebSocketServer {
|
|||||||
* */
|
* */
|
||||||
public static void sendInfo(SocketMsg socketMsg,@PathParam("sid") String sid) throws IOException {
|
public static void sendInfo(SocketMsg socketMsg,@PathParam("sid") String sid) throws IOException {
|
||||||
String message = JSONObject.toJSONString(socketMsg);
|
String message = JSONObject.toJSONString(socketMsg);
|
||||||
log.info("推送消息到"+sid+",推送内容:"+message);
|
|
||||||
for (WebSocketServer item : webSocketSet) {
|
for (WebSocketServer item : webSocketSet) {
|
||||||
try {
|
try {
|
||||||
//这里可以设定只推送给这个sid的,为null则全部推送
|
//这里可以设定只推送给这个sid的,为null则全部推送
|
||||||
|
|||||||
Reference in New Issue
Block a user