forked from metin2/client
1
0
Fork 0
client/EterLib/NetPacketHeaderMap.h

30 lines
527 B
C++

#pragma once
#include <map>
class CNetworkPacketHeaderMap
{
public:
typedef struct SPacketType
{
SPacketType(int iSize = 0, bool bFlag = false)
{
iPacketSize = iSize;
isDynamicSizePacket = bFlag;
}
int iPacketSize;
bool isDynamicSizePacket;
} TPacketType;
public:
CNetworkPacketHeaderMap();
virtual ~CNetworkPacketHeaderMap();
void Set(int header, TPacketType & rPacketType);
bool Get(int header, TPacketType * pPacketType);
protected:
std::map<int, TPacketType> m_headerMap;
};