For my multiplayer game, I'm trying to figure out a system to send multiple pieces of data from one client to another and separating pieces of data.
When sending a message, all parameter data has to be converted into a byte array (with BitConverter.GetBytes) and will arrive as such on the other side.
What I'm not sure about is how to send multiple numbers in one message and identify them. For example, how would I send a ushort and a ulong in a single byte array? Are there any clever methods to identify the individual numbers or will every number have to be packaged in 4 bytes each?