562935844@qq.com
2023-08-31 fdcf461fbfa3bcd650685743e891ad3357898f0c
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("初始化Socket 失败:" + e.getMessage());