mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: Fwd: Re: sorry, I'm not able to convert byte into myClass
Date Mon, 08 Feb 2010 16:39:41 GMT
thanks Emmanuel L├ęcharny,
> but my problem is not resolt...
> I must send and receive std BasicMessage without the dimension.
So tell me how you intend to deal with packets fragmentation ? Because 
you have to know that your message can be transmitted one byte at a time...

The only solution I see is to do something like :

try {
   BasicMessage m = createBasicMessage(byteVal);
} catch ( Exception e ) {
   // Here, we guess that we haven't received enough bytes to process a 
   return false;

But that will be very inefficient if you have fragmented messages...

Emmanuel L├ęcharny

View raw message