34 lines
721 B
C++
34 lines
721 B
C++
#pragma once
|
|
|
|
#include <Singleton.h>
|
|
#include <map>
|
|
|
|
class ServerSession;
|
|
|
|
class ServerSessionManager : public Singleton<ServerSessionManager>
|
|
{
|
|
public:
|
|
ServerSessionManager(void);
|
|
~ServerSessionManager(void);
|
|
|
|
private:
|
|
typedef std::map<DWORD, ServerSession*> SERVER_SESSION_MAP;
|
|
typedef SERVER_SESSION_MAP::iterator SERVER_SESSION_MAP_ITER;
|
|
|
|
private:
|
|
SERVER_SESSION_MAP m_mapSession;
|
|
|
|
public:
|
|
VOID AddSession( ServerSession* pSession );
|
|
VOID DelSession( DWORD dwSessionIndex );
|
|
ServerSession* Find( DWORD dwSessionIndex );
|
|
ServerSession* FindAgentSession( DWORD dwAgentKey );
|
|
ServerSession* FindMasterSession();
|
|
VOID Release();
|
|
|
|
#ifdef _NA_006543_20130318_HEARTBEAT
|
|
VOID update();
|
|
#endif
|
|
|
|
};
|