Hello.

I got trouble in socket programming.

My server is send packet 350-360 times.
But, client does not emit readReady SIGNAL 350-360.
I got readReady SIGNAL just 3-5 time.
Is it Bug? or What i missed?

server is like it.
Qt Code:
  1. while((sql_row=mysql_fetch_row(sql_result))!=NULL)
  2. {
  3. user_information_init(&user_info);
  4. if(sql_row[0]!=NULL)
  5. strcpy(user_info.id, sql_row[0]);
  6. if(sql_row[1]!=NULL)
  7. strcpy(user_info.name, sql_row[1]);
  8. if(sql_row[2]!=NULL)
  9. strcpy(user_info.grade, sql_row[2]);
  10. if(sql_row[3]!=NULL)
  11. strcpy(user_info.phone, sql_row[3]);
  12. if(sql_row[4]!=NULL)
  13. strcpy(user_info.email, sql_row[4]);
  14. if(sql_row[5]!=NULL)
  15. strcpy(user_info.homepage, sql_row[5]);
  16. code = 1000;
  17. memset(&buf, 0x00, MAXBUF_SIZE);
  18. memcpy(&buf[0], &code, sizeof(code));
  19. memcpy(&buf[4], &size, sizeof(size));
  20. memcpy(&buf[8], &user_info, sizeof(user_info));
  21. send(cfd, buf, 8+size, 0);
  22. }
To copy to clipboard, switch view to plain text mode 

client is like it.
Qt Code:
  1. connect(this, SIGNAL(readyRead()), this, SLOT(receive_slot()));
  2. receive_slot()
  3. {
  4. qDebug("Buddy_Info");
  5. //server send packet 350-360 time
  6. // but i got a 3-5 output message.
  7. //Is it Bug? or What i missed?
  8. }
To copy to clipboard, switch view to plain text mode