Again, this is because you assume that the buffer will contain all the data you want to read in it, whcih is not guaranteed bat the TCP protocol. You can perfectly receive the data byte by byte, each message containing only one byte of data.
You have to deal with it in your decoder. -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com
