Hi Yogs, Have you thought of using a delimiter in your messages? That could make your life a lot easier.
-U -----Original Message----- From: Yogs [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 11, 2007 9:35 PM To: [EMAIL PROTECTED] Subject: Issue with decoding variable length messages on MINA server Hi I have a blocking client connected to a MINA based server. And client is sending variable length message to server. The Message doesn't have a notion of msgLength. So in my decoder.docodable() method can't figure out whether this message is complete or not. So when I actually decode the message, I get BufferUnderFlowException in decode() method. I can calculate the length of message in decodable method, but for that I need to read the complete message. This can be multiple times till message arrives completely. and then i can actual decode the message in decode method. This is a huge overhead of reading the message multiple times. I really don't want to pass an extra msgLenght field in the message to solve this problem, because of compatibility issues with non java clients. Can you please suggest a way which MINA provides to deal with decoding of these types of variable length messages on servers? Thanks in Advance Regards, Yogs -- View this message in context: http://www.nabble.com/Issue-with-decoding-variable-length-messages-on-MI NA-server-tf3561563.html#a9946881 Sent from the mina dev mailing list archive at Nabble.com.