Well as my Topic already says i have a Problem with receiving all Data from a TcpSocket. Well let me first explain my project.
I have a AVR boad that runs a measurement software in linux. It receives commands from my Programm and then sends the measurement results. The Problem is that i dont receive all the data that is sent by the board.
I put my TcpSocket in a Thread (cant do it in another way as it is a task for my studies and my tutor wants the ethernet communication in a thread) and it all works fine with sending the data and commands to the board. Then the boards sends me the amount of data that it will send to me...so far all works...then i want to receive the measurement data but my my Programm only receives like 10-30 datasets but it should be 2000+....it stops receiving as soon as the server leaves its data_send function....so i guess my receive is to slow but i have no idea why that is.

this is the part of code where it gets stuck:

Qt Code:
  1. for (k = 0; k < measheader.anzchan; k++)
  2. {
  3. //receive data for each frequency, given by numfreqs
  4. for (i = 0; i < measheader.numfreqs; i++)
  5. {
  6. iBlocks = 0;
  7. while (iBlocks < (int) sizeof(specdata[i][k]))
  8. {
  9. if (new_sock.waitForReadyRead(30000))
  10. {
  11. iBytes = new_sock.read((char *)&specdata[i][k], sizeof(specdata[i][k]));
  13. if (iBytes > 0)
  14. {
  15. iBlocks += iBytes;
  16. }
  17. }
  18. }
  19. }
To copy to clipboard, switch view to plain text mode 

Well i hope anyone can help me with that.