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:
@@ -24,6 +24,9 @@
|
||||
#include <net/netcontext.h>
|
||||
#include <net/receivebuffer.h>
|
||||
#include <net/sessiondata.h>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
class SenderCallback;
|
||||
|
||||
class ClientContext : public NetContext
|
||||
{
|
||||
@@ -105,6 +108,7 @@ private:
|
||||
std::string m_cacheDir;
|
||||
bool m_hasSubscribedLobbyMsg;
|
||||
ReceiveBuffer m_receiveBuffer;
|
||||
boost::shared_ptr<SenderCallback> m_senderCallback;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user