public class Packet
{
static virtual Packet FromBuffer();
NetBuffer ToBuffer();
}
Right now, I construct each packet like this and manually write each value to a byte buffer.
I read in the FAQ when I arrived at here the use of marshalled structures. Should I potentially swap over to serialized versions of these?
I initially used serialized objects but the overhead for each packet was immense (100+ bytes, ouch). Packets that are constructed from structs are much smaller.
Main reasons to swap over:
*Objects have a higher allocation cost than structs? (stack vs heap)?
*Structs have automatic serialization advantage
Any other advantages? Disadvanages? Why should I do it / not?



















