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:
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user