0
votes

I want to send serialized data through ssl or tcp socket. QIODevice::write doesn't send QDataStream but only char* and QByteArray.

Is there a way I can send serialized data through socket? Or how can I convert QDataStream to QByteArray?

Thanks

1

1 Answers

1
votes

Pass your QIODevice to the QDataStream constructor. This will allow you to write to the device through the stream.