On 3/21/07, Rodrigo Madera <[EMAIL PROTECTED]> wrote:
Trustin,

Now that you mention it, how does MINA decide _when_ to call decodable()?

For example, on the HTTP codec example, I see that you actually try to see
the tail of the buffer as it was passed to the decodable() function. So
decodable() will be called when a line end is encountered? (don't think so
=o)

1. decodable() is invoked for all registered MessageDecoders.
2. If one of them returns OK, decode() of the MessageDecoder is
invoked until it returns OK.  If NOT_OK is returned, an exception is
raised.  If NEED_DATA is returned, decode() is invoked again later
when more data is received.
3. Go to 1.

Simple, right? :)

HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Reply via email to