Boost logo

Boost Users :

Subject: Re: [Boost-users] [ASIO] async_read buffer: starting byte null
From: Igor R (boost.lists_at_[hidden])
Date: 2010-05-23 14:47:49


> 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() :)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net