Fixed one thread per session implementation. Kind of. Still seems to have a handle leak on Windows. However, it does not scale at all and needs to be reverted. It won't even handle 500 players with 500 games on a dual core high end machine.
This commit is contained in:
@@ -23,13 +23,13 @@
|
||||
|
||||
#include <core/thread.h>
|
||||
#include <net/senderinterface.h>
|
||||
#include <net/sessiondata.h>
|
||||
#include <net/netpacket.h>
|
||||
#include <net/sendercallback.h>
|
||||
|
||||
#include <list>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
class SessionData;
|
||||
#define SENDER_THREAD_TERMINATE_TIMEOUT THREAD_WAIT_INFINITE
|
||||
|
||||
class SenderThread : public Thread, public SenderInterface
|
||||
@@ -56,8 +56,9 @@ private:
|
||||
SendDataList m_sendQueue;
|
||||
mutable boost::mutex m_sendQueueMutex;
|
||||
|
||||
boost::shared_ptr<SessionData> m_session;
|
||||
mutable boost::mutex m_sessionMutex;
|
||||
mutable boost::mutex m_sessionDataMutex;
|
||||
SOCKET m_sessionSocket;
|
||||
unsigned m_sessionId;
|
||||
boost::shared_ptr<NetPacket> m_curPacket;
|
||||
unsigned m_bytesSent;
|
||||
SenderCallback &m_callback;
|
||||
|
||||
Reference in New Issue
Block a user