562935844@qq.com
2022-09-23 830e47a67026205b75f69e061d81783aa606a237
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());