mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eero Nevalainen <eero.nevalai...@indagon.com>
Subject Re: How to check UDP message header length?
Date Fri, 09 Jan 2009 09:33:23 GMT
Steve Ulrich wrote:
>> hezjing [mailto:hezjing@gmail.com] wrote:
>> CumulativeProtocolDecoder is the choice since the header's size fixed,
>> and
>> there is a payload length information (correct?).
> The CumulativeProtocolDecoder is always a good idea. ;-)

Isn't it really needed just for TCP?

>> The question is, how do we know the header is ready to be parsed?
> "if (buffer.remaining() >= 6)" should work for you

You don't get partial UDP datagrams, so this won't happen due to 
network. It's good to check though, in case the sender is doing 
something wrong.

> btw: Please use the user ML as you are having problems using mina for your development.
> This ml is intended for discussions for further development of mina itself.

Yes, shutting up...



View raw message