Results 1 to 5 of 5

Thread: Problem with QTcpSocket and QDataStream

Hybrid View

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

    Default Re: Problem with QTcpSocket and QDataStream

    Quote Originally Posted by Valheru
    Thanks, just before you posted that I found out about QTextStream.readLine()
    Note that using QTextStream is a bit slower than operating on the device directly. So if QTextStream::readLine() is the only method of that class you use, you could consider calling readLine on the socket instead.

  2. #2
    Join Date
    Aug 2006
    Posts
    163
    Thanks
    12
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Problem with QTcpSocket and QDataStream

    Hmm, the reason why I am trying to stream the data is that because in the past with an earlier version of my program, I was getting strange errors when processing large amounts of data on the socket. I would list a newsgroup, and recieve the list of titles of the (in the form of the post number) from the newsserver. However, this only worked up until a certain number of posts. When listing large newsgroups, such as alt.binaries.boneless, after a while I would start getting an error. I can't remember what exactly, something along the lines of maxLen() > 2 ... I was processing the readLine() of the socket, adding the information directly into a QListWidget.

Similar Threads

  1. Replies: 6
    Last Post: 8th January 2007, 10:24

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.