[Qt-interest] Ftp client problem : how to get event related to network connection is down ?
Arnold Krille
arnold at arnoldarts.de
Sat Dec 18 14:22:50 CET 2010
On Saturday 18 December 2010 10:25:47 Ashish Soni wrote:
> Hi All,
>
> I am am trying to implement FTPClient in using QT Network .
>
> How can i handle exceptional cases like during downloading network cable is
> unplugged , not internet connection gone etc.. ?
>
> How can my FTPClient can come to know about such event and is there such
> kind of notification available ?
>
> I have tried to use signals like done(bool) , commandFinished ( int id,
> bool error ) but i m not getting any sort of signal.
The only things you can know is whether the connection to the remote host is
working or not.
Checking for a network-cable will not help you when a) the connection is made
via wireless or b) via bluetooth or c) via modem. There is also no sane why of
checking the connection-state from the ip-address your machine has. And even
if you find a way to do so, what do you want with that information? Make the
ftp-client only work when a connection to the internet is there? The only sane
usage for ftp is inside trusted networks, not across the internet (read about
security and ftp).
The only reliable way of checking whether the connection to the remote partner
will be working / is working, is by actually initiating the connection and
then deal with the errors...
Have fun,
Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101218/27b3de35/attachment.bin
More information about the Qt-interest-old
mailing list