
Originally Posted by
wysota
Do you read the data from the socket anywhere?
yes, right after.
forever {
if (nextBlockSize == 0){
if (tcpSocket->bytesAvailable() < sizeof (qint64))
break;
in >> nextBlockSize;
cout <<
"Block size: " <<
QString::number(nextBlockSize
).
toStdString() << endl;
}
if (tcpSocket->bytesAvailable() < nextBlockSize)
{
cout << "Going to break" << endl;
break;
}
in >> _applicationCall;
in >> _classCall;
in >> _methodCall;
in >> _eBusinessObject;
in >> qba;
}
QDataStream in(tcpSocket);
in.setVersion(QDataStream::Qt_4_5);
forever {
if (nextBlockSize == 0){
if (tcpSocket->bytesAvailable() < sizeof (qint64))
break;
in >> nextBlockSize;
cout << "Block size: " << QString::number(nextBlockSize).toStdString() << endl;
}
if (tcpSocket->bytesAvailable() < nextBlockSize)
{
cout << "Going to break" << endl;
break;
}
in >> _applicationCall;
in >> _classCall;
in >> _methodCall;
in >> _eBusinessObject;
in >> qba;
}
To copy to clipboard, switch view to plain text mode
and this works if the qba (QByteArray) is small but when it's large like the one I want to store the server stops. Probably it waits until it receives data = 31525678435008617 bytes which means forever.
Bookmarks