src/network/NetPacket.cpp

00001 #include "NetPacket.h"
00002 #include <cstring>
00003 
00004 NetPacket::NetPacket(const char *data, Uint32 size)
00005         :data(new char[size]),
00006         len(size)
00007 {
00008     memcpy(this->data, data, size);
00009 }
00010 
00011 NetPacket::~NetPacket(){
00012         delete[] data;
00013 }
00014 
00015 char* NetPacket::getData(){     
00016         return this->data;
00017 }
00018 

Generated on Mon Dec 3 04:30:13 2007 for lo-testserver by  doxygen 1.3.9.1