Home > Mobile > Strange problems encountered in the process of using tcpsocket readall function
Strange problems encountered in the process of using tcpsocket readall function
Time:09-17
Dear leaders, I have the following problems: I'll TCP client USES signal readyread () trigger slot function to receive data, the data transmission arise when readall receive less than the problem of data, can be seen through caught data has been sent, but I call readall read out of the total number of bytes with a file number of bytes in (using the internal cache data read by several times, application, sometimes I have found that the socket read buffer is full, but my side readall still can't read data, readyread also don't continue to trigger, program does not run in whlie cycle,
CodePudding user response:
By wireshark caught found that when there is a window full of TCP, the buffer is full readall first receive a piece of data is small, then the readyread will not be triggered
CodePudding user response:
Can calculate first file size, waiting for receiving enough in the loop
CodePudding user response:
I was through the event loop to receive packages, the file size of calculation has been completed, the key is to readall get data for the