10 Sep
2009
10 Sep
'09
5:39 a.m.
A.Agrawal@patrick.com.au wrote: [snip]
buffers.push_back(boost::asio::buffer((_data_serialized).c_str(), _data_serialized.length()));
[snip] I haven't read all of your code, but I don't think .c_str() will have an object lifetime that exceeds the asynchronous operation. There's support for std::string, you could try buffers.push_back(boost::asio::buffer(_data_serialized)); Have you verified that on your platform sizeof(MessageHeader) equals what you have set for it? Kind regards, Rutger ter Borg