asio::async_write(m_socket, asio::buffer(buf, bytes),
custom_alloc(m_strand.wrap(custom_alloc(_OnSend))));
Does this code guarantee
UPD: This answer is wrong=) For anyone interested you can check details in the tail of comments, thanks to Tanner Sansbury.
No. This guarantees your completion handler will be called with strand lock. This not includes calls to async_write_some.
Also boost::asio does not have something like "write queue" and you need to manage async_write calls in order to prevent writing mixed content.