public void sendHeartBeatMsg(ProcessResult procResult) {
        if (!isActive()) {
            logger.warn("NettyClient({}) to {} hb inActive",
                    this.senderId, hostInfo.getReferenceName());
            return;
        }
        if (!channel.isWritable()) {
            if (hbExptCnt.shouldPrint()) {
                logger.warn("NettyClient({}) to {} hb write_over_water", this.senderId, channelStr);
            }
            return;
        }
        EncodeObject encodeObject = buildHeartBeatMsg(this.senderId, tcpConfig);
        if (encodeObject == null) {
            if (hbExptCnt.shouldPrint()) {
                logger.warn("NettyClient({}) to {} hb failure:{}!",
                        this.senderId, channelStr, procResult.getErrMsg());
            }
        }
        try {
            write(channelTermId.get(), encodeObject, procResult);
        } catch (Throwable ex) {
            if (hbExptCnt.shouldPrint()) {
                logger.warn("NettyClient({}) send to {} hb exception ",
                        this.senderId, channelStr, ex);
            }
        }
        procResult.setSuccess();
    }
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