I know that I have the code but it doesn't work with big data. The nextBlockSize resets to 0 when I get the readyRead slot triggered and the when I read it again the number is wrong by far. What am I doing wrong there?
I know that I have the code but it doesn't work with big data. The nextBlockSize resets to 0 when I get the readyRead slot triggered and the when I read it again the number is wrong by far. What am I doing wrong there?
You have the nextBlockSize declared as a local variable of the slot connected to the readyRead() signal. The variable should persist across calls (e.g. by making it a member variable of the class).
it already is
Then you are overwriting it with bogus values. You can't possibly expect to get several terabytes of data through the socket from the client. It wouldn't even fit into the memory of your computer.
Bookmarks