public boolean isIdleClient(long curTime) {
        int curSentCnt = this.msgSentCnt.get();
        if (curSentCnt != this.lstRoundSentCnt) {
            this.lstRoundSentCnt = curSentCnt;
            this.clientIdleRounds = 0;
            return false;
        }
        if (this.clientIdleRounds++ == 0) {
            this.fstIdleTime = curTime;
            return false;
        }
        return curTime - this.fstIdleTime >= 30000L;
    }
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