From 30e96788f05f5ce28b58d991051c79e9c952c824 Mon Sep 17 00:00:00 2001 From: 562935844@qq.com Date: 星期三, 28 十二月 2022 14:51:34 +0800 Subject: [PATCH] 修改入网认证流程 --- HDLSDK/hdl-socket/src/main/java/com/hdl/sdk/socket/client/UdpClient.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/HDLSDK/hdl-socket/src/main/java/com/hdl/sdk/socket/client/UdpClient.java b/HDLSDK/hdl-socket/src/main/java/com/hdl/sdk/socket/client/UdpClient.java index 07d368d..8a78384 100644 --- a/HDLSDK/hdl-socket/src/main/java/com/hdl/sdk/socket/client/UdpClient.java +++ b/HDLSDK/hdl-socket/src/main/java/com/hdl/sdk/socket/client/UdpClient.java @@ -87,7 +87,7 @@ * @return */ public static UdpSocketBoot init(int port, UdpSocketOptions options) { - return init(null, port, options); + return init("0.0.0.0", port, options); } @@ -100,9 +100,11 @@ } if (TextUtils.isEmpty(ipAddress)) { mSocket = SocketPool.getInstance().getUdpSocket(new InetSocketAddress(port)); + }else { + mSocket = SocketPool.getInstance().getUdpSocket(new InetSocketAddress(ipAddress,port)); } mSocket.setBroadcast(true); - mSocket.setReuseAddress(true); +// mSocket.setReuseAddress(true); } catch (Exception e) { LogUtils.e("鍒濆鍖朣ocket 澶辫触锛�" + e.getMessage()); -- Gitblit v1.8.0