PDA

View Full Version : QFtp Unplug cable



josepvr
18th December 2008, 15:10
Hi!
I've been searching in this forum an googling for a long time but I didn't find any solution to my problem.

The problem is with QFtp when I'm connected to FTP server and I unplug network cable. In this case the QFtp object doesn't emit any signal to indicate that I have lost connection.

There is any solution to my problem?

Thanks a lot!

wysota
20th December 2008, 23:17
There is no reliable solution to your problem. Unplugging a network cable doesn't break the connection if you are not transmitting anything at the moment. It's not a Qt issue, it is the way IP networks work.

tpf80
21st December 2008, 09:42
One way would be to use a timer, and set it to a timeout period when you make a request. If the server does not respond to your request within your timeout period, then you assume that it is disconnected and initiate code to reconnect or give a message to the user that the connection timed out.

josepvr
22nd December 2008, 14:38
Thank's!
I'll use a timer to solve this!