One sender thread per client. Requires loads of resources. Kind of hacked, because the internal dependencies are very ugly now. Requires loads of testing. A problem might be the last packet sent by the server to a specific client before closing the connection, for example an error message. It might never even reach the client, because the sender thread is terminated before. I have not yet found a good way to fix this.

This commit is contained in:
lotodore
2009-01-07 21:52:16 +00:00
parent 606158c4f0
commit d72cdb6873
16 changed files with 150 additions and 325 deletions
+3 -3
View File
@@ -74,9 +74,9 @@ public:
void Clear();
unsigned GetRawSessionCount();
void SendToAllSessions(SenderInterface &sender, boost::shared_ptr<NetPacket> packet, SessionData::State state);
void SendLobbyMsgToAllSessions(SenderInterface &sender, boost::shared_ptr<NetPacket> packet, SessionData::State state);
void SendToAllButOneSessions(SenderInterface &sender, boost::shared_ptr<NetPacket> packet, SessionId except, SessionData::State state);
void SendToAllSessions(boost::shared_ptr<NetPacket> packet, SessionData::State state);
void SendLobbyMsgToAllSessions(boost::shared_ptr<NetPacket> packet, SessionData::State state);
void SendToAllButOneSessions(boost::shared_ptr<NetPacket> packet, SessionId except, SessionData::State state);
protected: