For games, this is not an "old school" capable of doing things - this is the norm.
This is due to the fact that, unlike typical web services, where the server will send short client data, rare packets, in games, the server and client constantly send packets back and forth. The number of packets needed to synchronize each client state with each other balloon exponentially with the number of players, so the more players your game will have, the more important that the packet size is small.
In addition, switching to the MTU size (usually around 1400 bytes) will result in packet fragmentation, which can significantly affect performance.
Please note that Microsoft has a download and download limit of 8 kilobytes per second for games made for the XBox 360, so you can’t pretty much create an MMO using XML for network messaging.
How to translate a byte into a message type: just use the switch or save Dictionary<byte, Type> or Dictionary<byte, Func<Message>> (assuming you have a bunch of message classes that all come from the base Message class)
source share