src/network/MessageIn.h

00001 /*
00002  * Some code is taken from the mana world server project (http://themanaworld.org).
00003  */
00004 
00005 #ifndef MESSAGEIN_H_
00006 #define MESSAGEIN_H_
00007 
00008 #include "Message.h"
00009 
00010 class NetPacket;
00011 
00012 
00017 class MessageIn : public Message
00018 {
00019 public:
00020 
00029         MessageIn(NetPacket* packet);
00030         
00037         virtual ~MessageIn();
00038         
00048         message_type getType() { return myType; }
00049         
00058     char read1();
00059     
00071     Uint16 read2();
00072     
00084     Uint32 read4();
00085         
00099          Uint32 getCRC();
00100          
00108          bool checkCRC();
00109                 
00123         std::string readString(Sint16 length = -1);
00124         
00131         void reset();
00132         
00133 private:
00134         Uint32 pos;                     
00135     NetPacket *myPacket;        
00136     message_type myType;        
00137 };
00138 
00139 #endif /*MESSAGEIN_H_*/

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