0

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

Jacob Krieg
  • 2,834
  • 15
  • 68
  • 140

1 Answers1

1

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

Dan Milburn
  • 5,600
  • 1
  • 25
  • 18