PDA

View Full Version : QTcpSocket & transfer errors



jkam
20th July 2008, 11:40
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

themolecule
20th July 2008, 21:42
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