Use a
structure[
^] and just add the fields you want into it. As long as both client and server use the same structure you should be able to do what you want. The general protocol of your message would then be to send the fixed length structure first, which will contain, at least, the length of the data message, followed by the data.