[Qt-interest] how to detect interenet connection ? or that the internet is down
Nikos Chantziaras
realnc at arcor.de
Sun Apr 11 15:49:28 CEST 2010
On 04/11/2010 03:32 PM, Meir Yanovich wrote:
> Hello all
> im developing desktop application that using internet heavlly , but now
> i need to develop mechanizem
> to detect that the internet connection is down , that mean i can't
> connect to the internet
> what is the best way to implement such mechanism ?
Well, the "best" way would probably be UPnP (which also is the only way
to detect whether there's internet connectivity). Qt does not offer any
interface for UPnP, you would have to write a UPnP parser yourself or
adapt someone else's.
This requires that the user that is running your application has a UPnP
capable (DSL)modem and that the UPnP functionality is enabled on it
(it's disabled on many systems due to security flaws in UPnP).
With all that being said, it's not worth the effort. Simply assume the
user has Internet connectivity and gracefully handle any errors that occur.
More information about the Qt-interest-old
mailing list