Hi, mina guys
first, MINA is a very nice framework, very easy to use, and another much
more inspiring thing is the community is much more active recently and the
MINA 3.0 is on the way
here I have a question about implement protocol codec on server side by
extending CumulativeProtocolDecoder, I try the examples first which saved me
a lot of time
but I notice that there's no way to support timeout in
CumulativeProtocolDecoder
since socket is stream based, and CumulativeProtocolDecoder is to help recv
the integrity request data, if the data is not recv completed, return
<code>false</code> in doDecode to tell the CumulativeProtocolDecoder more
data is needed, if the additional data not recv, it is a infinite loop,
right? (according to the code in
*org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(IoSession,
IoBuffer, ProtocolDecoderOutput)*)
so, that session blocked, and even more, other client new request are
blocked too?
I think it relatively easy to implement a "retry-time' strategy to prevent
from this suck, by attach a re-try time count as attribute to the session
but after all, it is not a time out
so is there any other ways to provide the read timeout mechanism, have I
missed any thing?
Thanks in advanced
Thanks & Best Regards!
///
(. .)
--------ooO--(_)--Ooo--------
| Nick Tan |
-----------------------------