This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Internet connection

Tags: None
(comma "," separated)
Spomky
Registered Member
Posts
15
Karma
0
OS

Internet connection

Fri Aug 20, 2010 11:49 am
Hello,

To know if my computer is connected on a network, I use the function status() of Solid::Networking.

But if the computer is connected, how can I know if Internet is available?
Is there a sure way to know if Internet is available?

Thank you for your answer.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Internet connection

Fri Aug 20, 2010 10:09 pm
Solid is only aware of the computer's networked state, and doesn't know of it's internet connectivity unfortunately.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Spomky
Registered Member
Posts
15
Karma
0
OS

Re: Internet connection

Mon Aug 23, 2010 7:18 pm
I found a way but it not very reliable: I use QHostInfo.

It is not reliable because if I use it just after the connection, sometimes DNS have not been updated and it returns me an error (host not found).
And if the domain I have queried is no more available, I get the same error.


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]