You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Adam Fisk <a...@lastbamboo.org> on 2007/07/07 00:57:54 UTC

Re: CumulativeProtocolDecoder vs.DemuxingProtocolCodec

CumulativeProtocolDecoder lends a hand by buffering bytes in the buffer
until there's enough data for you to handle.  If you're trying to read
"test" for example, you can tell CumulativeProtocolDecoder to keep returning
until 4 bytes are available.

DemuxingProtocolCodec is focused on allowing you to demultiplex 2 protocols
on the same session.  There are a number of protocols out there that support
multiple protocols on the same connection, but it's likely much less used
than CumulativeProtocolDecoder.  CumulativeProtocolDecoder can make decoding
much easier depending on what you're decoding.

Hope that helps.

-Adam


On 6/28/07, mat <fo...@gmail.com> wrote:
>
> What is the difference to use CumulativeProtocolDecoder than to use
> DemuxingProtocolCodec?
>