CSCommon: MMatchAgent.h 소스 파일

MAIET

MMatchAgent.h

00001 #ifndef MMATCHAGENT_H
00002 #define MMATCHAGENT_H
00003 
00004 
00005 #include "MObject.h"
00006 
00007 
00008 class MMatchAgent : public MObject {
00009 protected:
00010     char            m_szIP[64];
00011     unsigned int    m_nTCPPort;
00012     unsigned int    m_nUDPPort;
00013 
00014 public:
00015     MMatchAgent() {}
00016     MMatchAgent(const MUID& uid) : MObject(uid) { 
00017         ZeroMemory(m_szIP, sizeof(char)*64);    
00018         m_nTCPPort=0;
00019         m_nUDPPort=0;
00020     }
00021     virtual ~MMatchAgent() {};
00022 
00023     void SetAddr(char* szIP, unsigned short nTCPPort, unsigned short nUDPPort)  { 
00024         strcpy(m_szIP, szIP); m_nTCPPort = nTCPPort; m_nUDPPort = nUDPPort;
00025     }
00026     char* GetIP()                   { return m_szIP; }
00027     unsigned short GetTCPPort()     { return m_nTCPPort; }
00028     unsigned short GetUDPPort()     { return m_nUDPPort; }
00029 
00030     int GetStageCount()         { return 0; }
00031     int GetAssignCount()        { return 0; }
00032 };
00033 
00034 
00035 class MMatchAgentMap : public map<MUID, MMatchAgent*>{};
00036 
00037 
00038 #endif


MAIET entertainment