CSCommon: MMonitor.h 소스 파일

MAIET

MMonitor.h

00001 #ifndef MMONITOR_H
00002 #define MMONITOR_H
00003 
00004 #include "MClient.h"
00005 #include "MMap.h"
00006 
00007 class MMonitorCommandProcessor;
00008 class MCommand;
00009 struct MOBJECTBASICINFO;
00010 struct MOBJECTCACHEINFO;
00011 struct MBLOB_BASICINFO_UPDATE;
00012 
00013 
00015 class MMonitor : public MClient{
00016 protected:
00017     MMapManager m_MapManager;   
00018 
00019 protected:
00020     // socket event
00021     virtual bool OnSockConnect(SOCKET sock);
00022     virtual bool OnSockDisconnect(SOCKET sock);
00023     virtual bool OnSockRecv(SOCKET sock, char* pPacket, DWORD dwSize);
00024     virtual void OnSockError(SOCKET sock, SOCKET_ERROR_EVENT ErrorEvent, int &ErrorCode);
00025 
00026 
00027 
00028     virtual void OnRegisterCommand(MCommandManager* pCommandManager);
00029     virtual bool OnCommand(MCommand* pCommand);
00030     virtual void BrowseMap(const char* szMapName) = 0;
00031     virtual void OnResponseObjectList(int nMapID, int nCellID, MOBJECTBASICINFO* pObjBIArray, int nObjBIArrayCount);
00032     virtual void OnResponseObjectList(int nMapID, MOBJECTBASICINFO* pObjBIArray, int nObjBIArrayCount);
00033     virtual void OnResponseObjectCacheUpdate(MOBJECTCACHEINFO* pObjBIArray, int nObjBIArrayCount);
00034     virtual void OnResponseObjectBasicInfoUpdate(MBLOB_BASICINFO_UPDATE* pObjBlArray, int nObjBlArrayCount);
00035 
00037     void OutputLocalInfo(void);
00038 public:
00039     MMonitor(void);
00040 
00041     /*
00042     bool Create(int nPort);
00043     void Destroy(void);
00044     */
00045 
00047     virtual void Log(const char* szLog){ OutputMessage(szLog, MZMOM_LOCALREPLY); }
00048 
00049     virtual int OnConnected(MUID* pTargetUID, MUID* pAllocUID, MCommObject* pCommObj);
00050 
00052     MUID GetConnectedServer(void){ return m_Server; }
00053 };
00054 
00055 
00056 
00057 // 모니터와 서버가 분리되어 있지 않기 때문에 임시 정의된 함수들
00058 class MCommandCommunicator;
00059 void MTempSetZoneServer(MCommandCommunicator* pServer);
00060 MCommandCommunicator* MTempGetZoneServer(void);
00061 void MTempSetMaster(MCommandCommunicator* pMaster);
00062 MCommandCommunicator* MTempSetMaster(void);
00063 
00064 
00065 #endif


MAIET entertainment