Hello,

i've programmed a test-application in QT4-3-4 for Windows (Commercial eval for VS2003) to get maximum UDP-throghput.
The application is a simple receiver, that gets UDP-datagrams and calculates throughput. We also have a sender (written in C, WinAPI) and several receivers (C, C#, Java...). Now we are testing QT's performance. With C, WSA, we got results of astonishing 900-950MBit/s.
The QT-application has two threads, one for GUI and one only for receiving. I used QUdpSocket-class, but results were as bad as 35-40MBit/s.
What is wrong it?? Has anyone same experiences??
Here is how i did it (only the receiving function in the 2nd thread):
Qt Code:
  1. void sTestThread::run()
  2. {
  3. quint32 dgs = 0;
  4.  
  5. started = true;
  6. initRecv();
  7. while ( started )
  8. {
  9. psock->waitForReadyRead( 20 );
  10. if ( psock->hasPendingDatagrams() )
  11. {
  12. fill = psock->pendingDatagramSize();
  13. psock->readDatagram( buffer, MAX_UDPSIZE, 0, 0 );
  14. dgs++;
  15. checkDg();
  16. }
  17. }
  18. deinitRecv();
  19. }
To copy to clipboard, switch view to plain text mode 

regards and thanks

tigertap