Original Post
Hello everyone!
I'm now messing around with some networking stuff and started making a small multiplayer game, but i've came to the point where i need to decide how to encapsulate a network message.
I want to make my messages like this: [Message total length] [MessageID] [Data]
Can someone, please, explain me how to go for it? I've tried to make such a class in many ways but none of them succeeded...
Any example or pseudo code?
I'm coding in C#
I'm now messing around with some networking stuff and started making a small multiplayer game, but i've came to the point where i need to decide how to encapsulate a network message.
I want to make my messages like this: [Message total length] [MessageID] [Data]
Can someone, please, explain me how to go for it? I've tried to make such a class in many ways but none of them succeeded...
Any example or pseudo code?
I'm coding in C#