Hello,

One can easily write it to socket. E.g.

socket->write(value.toCbor());

But how to read it then? It seems it's not possible.

I.e. the following solution:

MyClient::MyClient()
{
      QCborStreamReader cborReader = new QCborStreamReader(socket);
}

MyClient::onReadyRead()
{
   QCborValue::fromCbor(cborReader);
}

Seems to be wrong. I.e. there can situation that data for the current item is not completely received yet. What happens then? It seems thing will stop working, because QCborValue::fromCbor can't resume from the point it stopped due to EndOfFile.

Am I right? And one just has to use plain QCborStreamReader/QCborStreamWriter.


_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to