wjc
2025-04-15 3b7a44351f3c961812ffa837302518646eae5b0d
sdk/src/main/java/com/hdl/sdk/link/core/connect/HDLConnectHelper.java
@@ -86,6 +86,10 @@
        void onFailure(HDLLinkCode hdlLinkCode);
    }
    public HDLConnectHelper(Long sendAwaitTime, int maxRetry, String ipAddress, int port,
                            LinkRequest linkRequest, HdlSocketListener listener, boolean isTcp) {
        this(sendAwaitTime,maxRetry,ipAddress,port,linkRequest,listener,isTcp,false);
    }
    /**
     * 发送UDP或者TCP数据
     *
@@ -98,7 +102,7 @@
     * @param isTcp         是否TCP
     */
    public HDLConnectHelper(Long sendAwaitTime, int maxRetry, String ipAddress, int port,
                            LinkRequest linkRequest, HdlSocketListener listener, boolean isTcp) {
                            LinkRequest linkRequest, HdlSocketListener listener, boolean isTcp,boolean useSubThread) {
        this.sendAwaitTime = sendAwaitTime;
        this.maxRetry = maxRetry;
        this.ipAddress = ipAddress;
@@ -107,6 +111,7 @@
        this.replyTopic = linkRequest.getReplyTopic();
        this.listener = listener;
        this.isTcp = isTcp;
        this.useSubThread=useSubThread;
        eventListener = new EventListener() {
@@ -167,7 +172,13 @@
     */
    public HDLConnectHelper(Long sendAwaitTime, int maxRetry, String ipAddress, int port,
                            LinkRequest linkRequest, HdlSocketListener listener, boolean isTcp, String mac) {
        this(sendAwaitTime, maxRetry, ipAddress, port, linkRequest, listener, isTcp);
        this(sendAwaitTime, maxRetry, ipAddress, port, linkRequest, listener, isTcp,false);
        this.mac = mac;
    }
    public HDLConnectHelper(Long sendAwaitTime, int maxRetry, String ipAddress, int port,
                            LinkRequest linkRequest, HdlSocketListener listener, boolean isTcp, String mac,boolean subThread) {
        this(sendAwaitTime, maxRetry, ipAddress, port, linkRequest, listener, isTcp,subThread);
        this.mac = mac;
    }