QPacket::QPacket(clientOpcode opcode){ QByteArray dev; QDataStream out(&dev, QIODevice::WriteOnly); out << (quint16) 0; out << (quint8) opcode;}
QPacket packet(C_AUTH_START);packet.out << "foo";packet.out << "bar";
void setStream(QDataStream stream) { out = stream; }
void initStream(QDataStream stream) { out.setDevice(stream.device()); }