- Joined
- Aug 14, 2015
- Messages
- 79
- Reaction score
- 18
Thanks for the reply. I already have a packet handling system with a simple function pointer array (handlers[opcode](params)) so execute function might be inapplicable. I'm not sure which one is better though, having the factory inside the base class or basically having an external factory which would take required data and return a NetworkMessage which is basically an std::vector<unsigned char> . Second option would save me from writing all those derived classes(considering there're over a 100 packets it feels second option might have an advantage).

