If I understand MINA right I need to implement my own protocol encoder
and decoder to support my protocol. The encoder looks quite simple but
the decoder looks a bit strange.
If I understand it right the decoder should be aware that a message
might be split to multiple doDecode() calls. The examples I found save
some state in the session. I'm ok so far.
But I do nut understand the buffer handling. If I'm right, I'm allowed
to read from position() to limit(). But what happens if I read to
limit() and have no message complete? Do I get the same buffer next
time again and can store the position where I stopped? If I set a
mark() is it stored over multiple doDecode() calls? How much buffer is
available? How do I mark the read part of the buffer as read?
Is there an example that explains how to handle the multiple
doDecode() messages and the buffer handling?
- Buffer handling example? pinus
- Re: Buffer handling example? Emmanuel Lecharny
- Re: Buffer handling example? Haug Bürger
- Re: Buffer handling example? Emmanuel Lecharny
