I'm not familiar with the boost libraries you're using, but the use of
async_write and the stack-allocated streambuf looks suspect. If nothing
jumps out there, I would first check that the data read from the socket in
Java exactly matches the data on the C++ side.
On Sat, Jul 2, 2011 at 8:55 AM,
Basic rule: if the memory is used outside the lifetime of the function call,
you don't want it on the stack. Async_write very much requires the memory to be
around later.
--Chris
On Jul 6, 2011, at 10:10 AM, platzhirsch konrad.rei...@googlemail.com wrote:
I find it difficult to check this by
Can you not control the number of messages?
In any event, I think the problem is the memory lifetime of the streambuf.
From the docs on async_write:
b
A basic_streambuf object from which data will be written. Ownership of the
streambuf is retained by the caller, which must guarantee that it