I\'m attempting to write jpeg frames via a socket to a client using async_write()
. I used the boost asynchronous TCP daytime server example as a starting point.
An issue is that using the async_write
function data will be send not immediately by the function but in some time after the start
method is finished and the local message_
variable will be destroyed and the boost::asio::buffer
does not copy the content of message_
. It stores only a reference to it. The result is unpredictable. May be transmission of 65536 bytes is the result of this behavior.