diff options
author | Treeki <treeki@gmail.com> | 2013-12-25 09:00:59 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-12-25 09:00:59 +0100 |
commit | b7a8b597b00eedde277836eb8530ba742edcad5d (patch) | |
tree | 1b959fa0eec02ff4e22e168aa4379b2b64575ce3 /server/packetwriter.h | |
download | bounce_qt-master.tar.gz bounce_qt-master.zip |
Diffstat (limited to '')
-rw-r--r-- | server/packetwriter.h | 21 |
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 |