Netty nested pipelines / multiplexing

I am new to Netty, but how to implement in Netty 4.x the case where multiple protocols (e.g. P1 and P2) are encapsulated inside another protocol?

+-------------+ | decoder | +-------------+ | encoder | +-------------+ | muxer | +-------------+ | demuxer | +---+------+--+ | | | | +------+ +------+ | | | | vv +-------------+ +-------------+ | P1 decoder | | P2 decoder | +-------------+ +-------------+ | P1 encoder | | P2 encoder | +-------------+ +-------------+ | P1 handler | | P2 handler | +-------------+ +-------------+ 

Is there a way to create nested pipelines, so that the decoder<->encoder<->muxer<->demuxer , which is the main pipeline, will send data via the P1 or P2 pipeline based on the demuxer solution?

Or maybe there is a way to somehow create (for clarity) "subchannels" with their pipelines?

+6
source share
1 answer

There is no support for "nested pipelines" yet. It can be part of 4.1.0. Now you need to remove / add handlers on the fly.

See [1] for an example.

[1] https://github.com/netty/netty/blob/master/example/src/main/java/io/netty/example/portunification/PortUnificationServerHandler.java

+2
source

All Articles