diff options
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 |