
Originally Posted by
Komakech
Your concept is great for sending packets but not receiving. There's a lot of data management within a received packet, it's not quite as simple as calling a pre-built static class, after-all packets technically are part of the User and not a general thing to be used elsewhere. I will take a look most likely next weekend into how I could do it and report back on what I've come up with. I just disagree with throwing hundreds of functions into the User class if it is only going to be called by the socket, the packets should have reference to the user but not be thrown into their class as if it's some sort of shared storage unit.
I had considered shortly after my previous comment of having a layered system, where I have a packetHandler which extends each packetClass, this would mean they were separated into separate classes but are called through the top-level packetHandler, this would mean the User only has one instance constructed rather than 20+. Thoughts?