37 MessageIn(
const char *data,
unsigned int length);
83 uint16_t &dstX, uint16_t &dstY);
88 void skip(
unsigned int length);
Used for parsing an incoming message from eAthena.
std::string readString(int length=-1)
Reads a string.
void readCoordinates(uint16_t &x, uint16_t &y, uint8_t &direction)
Reads a special 3 byte block used by eAthena, containing x and y coordinates and direction.
const char * mData
The message data.
void skip(unsigned int length)
Skips a given number of bytes.
unsigned short mId
The message ID.
uint16_t readInt16()
Reads an unsigned 16-bit integer from the message.
unsigned int getUnreadLength() const
Returns the length of unread data.
uint8_t readInt8()
Reads an unsigned 8-bit integer from the message.
void readCoordinatePair(uint16_t &srcX, uint16_t &srcY, uint16_t &dstX, uint16_t &dstY)
Reads a special 5 byte block used by eAthena, containing a source and destination coordinate pair.
unsigned int mPos
Actual position in the packet.
uint16_t getId() const
Returns the message ID.
unsigned int mLength
The length of the data.
uint32_t readInt32()
Reads an unsigned 32-bit integer from the message.
unsigned int getLength() const
Returns the message length.
Warning: buffers and other variables are shared, so there can be only one connection active at a time...