
23 May
2010
23 May
'10
6:47 p.m.
packet_.buffer() returns the clients current buffer (buffer[512]) as char*
Do you always supply the same buffer for any async_receive? So a new data always overwrites the old one? Then, maybe you calculate 1st message size incorrectly, and "zero" prefix you observe in the buffer before the beginning of the 2nd header might be just a trailing zero of the previous message. Try adding 1 to the calculated bodySize() :)