mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Rosenstrauch <dar...@darose.net>
Subject Re: Handling variable length request/response in MINA
Date Tue, 23 Jun 2009 14:10:19 GMT
Maarten Bosteels wrote:
> It's in the javadocs: " doDecode() is invoked repeatedly until it returns
> false "
> 
> So there is no need to have a loop in your doDecode implementation for
> decoding multiple messages.
> 
> http://mina.apache.org/report/trunk/apidocs/org/apache/mina/filter/codec/CumulativeProtocolDecoder.html#doDecode(org.apache.mina.core.session.IoSession,%20org.apache.mina.core.buffer.IoBuffer,%20org.apache.mina.filter.codec.ProtocolDecoderOutput)
> 
> Maarten

JavaDocs are a bit confusing on the topic, actually.

decode() says:  "doDecode() is invoked repeatedly until it returns false"

but doDecode() says:  "this method will be invoked again when more data 
is cumulated"

So it's a bit contradictory.

DR

Mime
View raw message