Closed benjxia closed 3 months ago
I ran the refactored code like this: 1) start server, 2) start a client, 3) start another client.
Issue: The second client causes the server to receive packets it doesn't understand (error in packet types):
@benjxia could u look into this ^
Also, I'd prefer to keep sessions as a std::map<unsigned int, SOCKET
, because when a connection closes, we need the session id to remove the right client's socket. It'd be time inefficient to do so with vector.
^I'm gonna push the close connection code asap
Made some namespace stuff consistent, switched over to smart pointers, and changed some types to better match the use case.