You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by peter royal <pr...@apache.org> on 2007/05/02 11:00:57 UTC
Re: feature request
On Apr 19, 2007, at 8:47 PM, Rob Butler wrote:
> Some protocols pass along the length of a complete message within
> the message itself (HTTP, DNS, etc). Instead of Mina constantly
> expanding it's buffers and calling into the protocol decoder it
> would be beneficial if there was some way to tell Mina what the
> expected size was. That way Mina could allocate a buffer capable
> of holding the entire message once instead of doubling in size
> multiple times. Also, calling into the decode could be post-poned
> until the entire message has been received.
>
> This could probably be implemented as a filter, similar to
> CumulativeProtocolDecoder.
Depends.. Since the original ByteBuffer is created when reading the
data from the Channel. But if you want to work up a proof-of-concept
patch, that'd rock!
-pete
--
proyal@apache.org - http://fotap.org/~osi