From c84efd301bac95180aa3507a8a9a1c53068c8bb9 Mon Sep 17 00:00:00 2001 From: 562935844@qq.com Date: 星期五, 15 九月 2023 09:45:03 +0800 Subject: [PATCH] Merge branch 'androidx' of ssh://172.16.1.23:29718/~cjl/HDLSDK_A_Android into androidx --- 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