From 8a249407f9a91b696b88d74eea0fbf789d0ee6a4 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期四, 24 四月 2025 10:34:05 +0800 Subject: [PATCH] 2025年04月24日10:34:03 --- sdk/src/main/java/com/hdl/sdk/link/core/connect/HDLConnectHelper.java | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/sdk/src/main/java/com/hdl/sdk/link/core/connect/HDLConnectHelper.java b/sdk/src/main/java/com/hdl/sdk/link/core/connect/HDLConnectHelper.java index 257685c..bd41479 100644 --- a/sdk/src/main/java/com/hdl/sdk/link/core/connect/HDLConnectHelper.java +++ b/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); + } /** * 鍙戦�乁DP鎴栬�匱CP鏁版嵁 * @@ -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; } -- Gitblit v1.8.0