I have to create an application layer protocol for a C++ application, but I have some doubts about how I can do it, especially about the serialization: