Reference to learn https://www.cnblogs.com/jpfss/p/9929108.html
Custom communications protocols encountered in the development process, encounter such a case, two protocol packets will domains, a command code, and command code corresponding to the command data.
How that define the message structure it?
Therefore, this process may need to use generics.
To be finishing.