Results 1 to 4 of 4

Thread: QFtp Unplug cable

  1. #1
    Join Date
    Oct 2008
    Location
    Catalunya
    Posts
    22
    Thanks
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QFtp Unplug cable

    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!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QFtp Unplug cable

    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.

  3. #3
    Join Date
    Oct 2006
    Location
    Hawaii
    Posts
    130
    Thanks
    48
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFtp Unplug cable

    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.

  4. #4
    Join Date
    Oct 2008
    Location
    Catalunya
    Posts
    22
    Thanks
    7
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QFtp Unplug cable

    Thank's!
    I'll use a timer to solve this!

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.