summaryrefslogtreecommitdiff
path: root/server/packetwriter.h
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-12-25 09:00:59 +0100
committerTreeki <treeki@gmail.com>2013-12-25 09:00:59 +0100
commitb7a8b597b00eedde277836eb8530ba742edcad5d (patch)
tree1b959fa0eec02ff4e22e168aa4379b2b64575ce3 /server/packetwriter.h
downloadbounce_qt-master.tar.gz
bounce_qt-master.zip
commit initial bitsHEADmaster
Diffstat (limited to '')
-rw-r--r--server/packetwriter.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/server/packetwriter.h b/server/packetwriter.h
new file mode 100644
index 0000000..e3be778
--- /dev/null
+++ b/server/packetwriter.h
@@ -0,0 +1,21 @@
+#ifndef PACKETWRITER_H
+#define PACKETWRITER_H
+
+#include <QString>
+#include <QByteArray>
+
+class PacketWriter {
+public:
+ PacketWriter(int reservedSize = 0);
+
+ const QByteArray &buffer() const { return m_buffer; }
+
+ void writeU32(quint32 value);
+ void writeBytes(const quint8 *input, int size);
+ void writeString(const QString &string);
+
+private:
+ QByteArray m_buffer;
+};
+
+#endif // PACKETWRITER_H