So, I'm learning Boost.ASIO and I thought that, like any high level networking library, it would be able to queue messages for me. boost::asio::async_write looks like the perfect candidate: I would just call it repeatedly for all the messages that need to be sent, and let it do its thing. But then I read this in the documentation:
Boost wrote:
The program must ensure that the stream performs no other write operations (such as async_write, the stream's async_write_some function, or any other composed operations that perform writes) until this operation completes.