@Override
    public void initChannel(SocketChannel ch) throws Exception {

        // Setup channel except for the SsHandler for TLS enabled connections

        ch.pipeline().addLast("frameDecoder", new LengthFieldBasedFrameDecoder(
                65536, 0, 4, 0, 0));

        ch.pipeline().addLast("contentDecoder", new ProtocolDecoder());
        ch.pipeline().addLast("contentEncoder", new ProtocolEncoder());
        ch.pipeline().addLast("handler", new ClientHandler(tcpClientMgr));
    }
TCP client Pipeline Factory class

Used to build TCP pipeline
inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/network/tcp/ClientPipelineFactory.java