Results 1 to 6 of 6

Thread: QT Network Performance.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Posts
    68
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT Network Performance.

    Did you check total size of received data ? Because some "tcp messages" may bound together, but not lost.
    what should i do to avoid that....!
    Last edited by wysota; 3rd April 2008 at 19:54.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QT Network Performance.

    The fact that readyRead() was emitted less than 1000 times doesn't mean there are less than 1000 messages in the buffer. Instead of reading one message at a time, read as many messages at once as there are waiting in the buffer.

    Qt Code:
    1. while(sock->bytesAvailable()>=8){
    2. QByteArray dat = sock->read(8);
    3. doSomething(dat);
    4. }
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Checking network availability
    By fullmetalcoder in forum Qt Programming
    Replies: 2
    Last Post: 10th March 2008, 19:23
  2. No network when Modem Emulator connect to a real device
    By tommy_tang in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 10th December 2007, 08:24
  3. QByteArray with network data
    By merlvingian in forum Qt Programming
    Replies: 1
    Last Post: 1st June 2007, 17:53
  4. QSocket - signal for network wire disconnection
    By manivannan_1984 in forum Qt Programming
    Replies: 7
    Last Post: 5th September 2006, 13:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.