panlili2024
2025-02-21 d31f2155237aa65cee1cb6ce1d39c48191663226
HDLSDK/hdl-connect/src/main/java/com/hdl/sdk/connect/bean/LinkRequest.java
@@ -1,9 +1,10 @@
package com.hdl.sdk.connect.bean;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import com.hdl.sdk.common.utils.LogUtils;
import com.hdl.sdk.connect.config.HDLLinkConfig;
import com.hdl.sdk.common.utils.ByteUtils;
import com.hdl.sdk.connect.utils.AesUtil;
@@ -55,7 +56,6 @@
        this.length = length;
    }
    @NonNull
    @Override
    public String toString() {
        return "Topic:" +
@@ -87,10 +87,13 @@
                String headString = "Topic:" + getTopic() + "\r\n" + "Length:" + dataBytes.length + "\r\n" + "\r\n";
                byte[] headBytes = headString.getBytes("utf-8");
                byte[] sendBytes = ByteUtils.concatBytes(headBytes, dataBytes);
                LogUtils.i("发送数据:\r\n" + headString + "\r\n" + data);
                return sendBytes;
            } else {
                return this.toString().getBytes("utf-8");
                String sendString = this.toString();
                LogUtils.i("发送数据:\r\n" + sendString);
                return sendString.getBytes("utf-8");
            }
        } catch (Exception e) {