private boolean processEvent(SendQos sendQos,
            TcpEventInfo eventInfo, MsgSendCallback callback, ProcessResult procResult) {
        if (this.isMetaInfoUnReady()) {
            return procResult.setFailResult(ErrorCode.NO_NODE_META_INFOS);
        }
        EncodeObject encObject =
                new EncodeObject(eventInfo.getGroupId(), eventInfo.getStreamId(),
                        tcpConfig.getSdkMsgType(), eventInfo.getDtMs(), eventInfo.getBodySize());
        // pre-process attributes
        processEventAttrsInfo(sendQos, eventInfo, encObject);
        // check package length
        if (!isValidPkgLength(encObject.getAttrDataLength(),
                eventInfo.getBodySize(), this.getAllowedPkgLength(), procResult)) {
            return false;
        }
        // process body
        if (!procEventBodyInfo(eventInfo, procResult, encObject)) {
            return false;
        }
        // get client object
        if (!tcpClientMgr.getClientByRoundRobin(procResult)) {
            return false;
        }
        TcpNettyClient client = (TcpNettyClient) procResult.getRetData();
        encObject.setMessageIdInfo(tcpClientMgr.getNextMsgId());
        try {
            return tcpClientMgr.reportEvent(sendQos, client, encObject, callback, procResult);
        } finally {
            client.decClientUsingCnt();
        }
    }
TCP Message Sender class

Used to define the TCP sender common methods
inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/sender/tcp/InLongTcpMsgSender.java