|
Boost Users : |
Subject: Re: [Boost-users] [ASIO] async_read buffer: starting byte null [SOLVED]
From: Matty Spatty (mattyspatty_at_[hidden])
Date: 2010-05-23 15:39:57
> 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() :)
Thank you! You were correct, I had forgotten to account for a trailing zero
in packets and it was carrying over into following receives. I feel so
foolish... Thanks again :)
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