On 5/9/06, Frederic Soulier <[EMAIL PROTECTED]> wrote:
Ok so I can achieve what I think the Demuxing stuff was doing by
having 2 ProtocolCodecFactory registered in the filter chain.
"codec1"
ProtocolCodecFactory_1
encoder1
decoder1
"codec2"
ProtocolCodecFactory_2
encoder2
decoder2
builder.addFirst("filter1", new ProtocolCodecFilter(codec1));
builder.addLast("filter2", new ProtocolCodecFilter(codec2));
In that case:
decoder1 writes to ProtocolDecoderOutput -> decoder2
encoder1 writes to ProtocolEncoderOutput -> encoder2
or is it symetrical?
decoder1 writes to ProtocolDecoderOutput -> decoder2
encoder2 writes to ProtocolEncoderOutput -> encoder1
Is that correct?
Encoding is done exactly in the reversed order. So the latter is the
correct answer. :)
The one thing you have to note is that decoders will bypass non-ByteBuffers,
and encoders will bypass ByteBuffers by its nature.
HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6