... > "cmd" field as the first field in the struct being sent, my > only concern is what happens to the rest of the "trash" data > after first memcpy. E.g., StructA and StructB, StructB is > bigger than StructA, both have the first field as a "char > cmd", but the rest of the data causes the structs to not be > the same size.
You can use a union so all structs are maxed out. However, I would advise a packet class. I send strings as: short len; char data[]; which is variable length, so no struct can catch those. Going for worst case means very bad things when trying to send over strings... Ruud _______________________________________________ ENet-discuss mailing list [email protected] http://lists.cubik.org/mailman/listinfo/enet-discuss
