From 618d7684ddaf2449461b18b1c834d2f8e8f7da1c Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 26 三月 2025 10:03:56 +0800
Subject: [PATCH] 1、通信中间件配置方式进行调整,以方便修改; 2、增加文档《打包发布配置修改》。

---
 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