summaryrefslogtreecommitdiff
path: root/src/net/manaserv/messagein.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-05-01 22:38:07 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-05-05 22:30:00 +0200
commitdf9ed1ab4364fe29bf260cae51827cc2722eff78 (patch)
tree45324f700d2b2c87983fa4b8c5ed01ee2e68ba70 /src/net/manaserv/messagein.h
parent96abc4a9658b3318d0052dc5cd31a3c15d76a494 (diff)
downloadmana-client-df9ed1ab4364fe29bf260cae51827cc2722eff78.tar.gz
mana-client-df9ed1ab4364fe29bf260cae51827cc2722eff78.tar.bz2
mana-client-df9ed1ab4364fe29bf260cae51827cc2722eff78.tar.xz
mana-client-df9ed1ab4364fe29bf260cae51827cc2722eff78.zip
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
Diffstat (limited to 'src/net/manaserv/messagein.h')
-rw-r--r--src/net/manaserv/messagein.h16
1 files changed, 10 insertions, 6 deletions
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 <cstdint>
#include <string>
@@ -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;
};