private EncodeObject buildHeartBeatMsg(String senderId, ProxyClientConfig configure) {
        EncodeObject encObject = new EncodeObject(null, null,
                MsgType.MSG_BIN_HEARTBEAT, System.currentTimeMillis(), 30);
        encObject.setMessageIdInfo(0);
        int intMsgType = encObject.getMsgType().getValue();
        Map<String, String> newAttrs = new HashMap<>();
        if (configure.isEnableReportAuthz()) {
            intMsgType |= SdkConsts.FLAG_ALLOW_AUTH;
            long timestamp = System.currentTimeMillis();
            int nonce = new SecureRandom(String.valueOf(timestamp).getBytes()).nextInt(Integer.MAX_VALUE);
            String signature = AuthzUtils.generateSignature(
                    configure.getRptUserName(), timestamp, nonce, configure.getRptSecretKey());
            if (StringUtils.isBlank(signature)) {
                return null;
            }
            newAttrs.put("_userName", configure.getRptUserName());
            newAttrs.put("_clientIP", ProxyUtils.getLocalIp());
            newAttrs.put("_signature", signature);
            newAttrs.put("_timeStamp", String.valueOf(timestamp));
            newAttrs.put("_nonce", String.valueOf(nonce));
        }
        encObject.setAttrInfo(intMsgType, false, null, newAttrs);
        return encObject;
    }
TCP Netty client class

Used to manage TCP netty client, including connection, closing, keep-alive, sending status check, etc.
inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/network/tcp/TcpNettyClient.java