From df9ed1ab4364fe29bf260cae51827cc2722eff78 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Tue, 1 May 2012 22:38:07 +0200 Subject: Added debugging mode to the protocol This makes the client able to send and receive messages sent in debugging mode, where the contents of the messages are annotated. For messages sent from the client the debugging mode is currently always enabled. Later on this could be an internal option or controlled from the server side. Reviewed-by: Erik Schilling --- src/net/manaserv/messagein.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/net/manaserv/messagein.h') diff --git a/src/net/manaserv/messagein.h b/src/net/manaserv/messagein.h index ef0c29bf..89ae5ed8 100644 --- a/src/net/manaserv/messagein.h +++ b/src/net/manaserv/messagein.h @@ -22,6 +22,8 @@ #ifndef NET_MANASERV_MESSAGEIN_H #define NET_MANASERV_MESSAGEIN_H +#include "net/manaserv/manaserv_protocol.h" + #include #include @@ -75,14 +77,16 @@ class MessageIn std::string readString(int length = -1); private: - const char *mData; /**< The message data. */ - unsigned int mLength; /**< The length of the data. */ - unsigned short mId; /**< The message ID. */ + bool readValueType(ManaServ::ValueType type); + + const char *mData; /**< The message data. */ + unsigned int mLength; /**< The length of the data. */ + unsigned short mId; /**< The message ID. */ + bool mDebugMode; /**< Includes debugging information. */ /** - * Actual position in the packet. From 0 to packet->length. - * A value bigger than packet->length means EOP was reached when - * reading it. + * Actual position in the packet. From 0 to packet->length. A value + * bigger than packet->length means EOP was reached when reading it. */ unsigned int mPos; }; -- cgit v1.2.3-70-g09d2