Results 1 to 2 of 2

Thread: QTcpSocket & transfer errors

  1. #1
    Join Date
    Jul 2008
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QTcpSocket & transfer errors

    Hello Gurus

    Must I make error control in my server/client application ?, because I find errors in data transfer. It works without errors on single machine, but when server is other machine as client (they comunicate over ethernet) erros is rising. I tought that TCP have error control

  2. #2
    Join Date
    Jul 2007
    Location
    New York
    Posts
    45
    Thanks
    5
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: QTcpSocket & transfer errors

    make sure you're setting the data stream version. error control it built into tcp.

    If you're passing raw data then the error is likely in your write/read routines.

    If you're passing Qt types around then make sure enough data is available to read, otherwise you will not be able to construct objects when they are received.

    check out QDataStream << and >> operators

Similar Threads

  1. QTcpSocket problem in file transfer
    By omprakash in forum Qt Programming
    Replies: 6
    Last Post: 25th January 2010, 08:18
  2. File Transfer with QTcpServer and QTcpSocket
    By NoRulez in forum Qt Programming
    Replies: 2
    Last Post: 21st October 2009, 17:12
  3. Strange QTcpSocket behavior (debugged with Ethereal)
    By mdecandia in forum Qt Programming
    Replies: 23
    Last Post: 28th May 2007, 20:44

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.