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 BasicMessage
  return false;
}

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

--
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com


Reply via email to