From a825de7f4b9c183ea9e322a30d250436833fc1b2 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 26 三月 2025 17:05:14 +0800
Subject: [PATCH] 删除测试模块
---
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/largeScreen/WebSocketServer.java | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/largeScreen/WebSocketServer.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/largeScreen/WebSocketServer.java
index 9bcf52c..1f2d1c9 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/largeScreen/WebSocketServer.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/largeScreen/WebSocketServer.java
@@ -27,7 +27,8 @@
// 瀹㈡埛绔繛鎺ヤ細璇濓紝閫氳繃瀹冪粰瀹㈡埛绔彂閫佹暟鎹�
private Session session;
-
+ // 瀹㈡埛绔笂绾挎椂鍒�
+ //private String onLineDt ;
// 瀹㈡埛绔痠d
private String id = "";
@@ -39,7 +40,11 @@
@OnOpen
public void onOpen(Session session, @PathParam("id") String id) {
this.session = session;
+ //this.onLineDt = DateTime.yyyy_MM_dd_HH_mm_ss() ;
this.id = id;
+ if(this.id == null || this.id.length() == 0){
+ this.id = "" + System.nanoTime() ;
+ }
this.sendMessage(WebSocketHeartBeat.getHeartBeatMessage());
if (webSocketMap.containsKey(id)) {
@@ -98,7 +103,7 @@
/**
* 鏈嶅姟鍣ㄤ富鍔ㄧ兢鎺ㄩ�佹秷鎭�
*/
- public static void sendAllMessage(String message) throws IOException {
+ public static void sendMessage2AllClient(String message) throws IOException {
ConcurrentHashMap.KeySetView<String, WebSocketServer> ids = webSocketMap.keySet();
for (String id : ids) {
WebSocketServer webSocketServer = webSocketMap.get(id);
@@ -109,7 +114,7 @@
/**
* 鏈嶅姟鍣ㄦ寚瀹氬鎴风鎺ㄩ�佹秷鎭�
*/
- public static void sendOneMessage(String message, String id) throws IOException {
+ public static void sendMessage2OneClient(String message, String id) throws IOException {
if (message != null && message.length() != 0 && webSocketMap.containsKey(id)) {
webSocketMap.get(id).sendMessage(message);
} else {
--
Gitblit v1.8.0