I don't really know how to put this question, but here we go.
So let's assume I'm using ASIO from Boost libs to connect to a server using a TCP socket and write a certain message to it.
The message contains some user data and looks like this: 1 byte (packet ID), 4 bytes (integer), user null-terminated string and 6 zero bytes (reserved by the server but unused).
What would be the most convenient way to assemble such a message for use with ASIO's boost::asio::buffer function?
I'm really confused at this point. Help greatly appreciated.