From 7c8ce9b9a7d3fc1aaa4a621e86415b25ad10a34f Mon Sep 17 00:00:00 2001
From: panlili2024 <14743743+panlili2024@user.noreply.gitee.com>
Date: 星期三, 19 三月 2025 09:36:28 +0800
Subject: [PATCH] 添加source屏扫码流程

---
 HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/socket/HDLAuthSocket.java |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/socket/HDLAuthSocket.java b/HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/socket/HDLAuthSocket.java
index 950e4aa..9b94bcf 100644
--- a/HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/socket/HDLAuthSocket.java
+++ b/HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/socket/HDLAuthSocket.java
@@ -55,6 +55,7 @@
      * udp榛樿绔彛
      */
     private static final int UDP_PORT = 8585;
+    private static int BIND_UDP_PORT = 8584;
     /**
      * 鍥犱负鑰冭檻鍒颁娇鐢ㄤ竴涓鍙o紝瑕佹敮鎸佹帴鏀跺缃戝叧鐨勬暟鎹紝鎵�浠ュ彧鍏佽浣跨敤涓�涓�
      */
@@ -115,7 +116,9 @@
     private synchronized UdpSocketBoot getUdpBoot() {
         try {
             if (udpSocketBoot == null) {
-                udpSocketBoot = UdpClient.init(UDP_PORT, getUdpOptions());
+                //鍖哄垎鏄�8584杩樻槸8585
+                BIND_UDP_PORT = HDLSdk.getInstance().getBindPort();
+                udpSocketBoot = UdpClient.init(BIND_UDP_PORT, getUdpOptions());
                 udpSocketBoot.bind();
 
                 LogUtils.i("鍒濆鍖朣ocket udp");
@@ -585,7 +588,7 @@
         if (broadcast) {
             ip = IpUtils.getBroadcastAddress();
         }
-        HdlSocketHelper.sendUdp(getUdpBoot(), ip, UDP_PORT, message,"", 1, new HdlSocketHelper.HdlSocketListener() {
+        HdlSocketHelper.sendUdp(getUdpBoot(), ip, UDP_PORT, message, "", 1, new HdlSocketHelper.HdlSocketListener() {
                     @Override
                     public void onSucceed(Object msg) {
                         if (callBack == null) return;
@@ -703,6 +706,8 @@
                                     HDLLinkConfig.getInstance().setCurrentGateway(searchBean);//璁剧疆褰撳墠缃戝叧
                                     if (mSearchGatewayCallBack != null) {
                                         mSearchGatewayCallBack.onSuccess(searchBean);
+                                        HDLSocket.getInstance().isBroadcast = true;
+                                        HDLSocket.getInstance().getTcp();
                                     }
                                 }
                             }

--
Gitblit v1.8.0