![](http://www.baskuenen.myweb.nl/images/title.jpg)
🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Detect Internet connection
How can I detect if I''m connected to the internet?
I could do a gethostbyname("www.gamedev.net") but this too crude for me. I have a modem, and I don''t want that Dialup dialog on my screen.
If you have any clue, please help...
![](http://www.baskuenen.myweb.nl/images/title.jpg)
After searching for more info on the net, and visiting some talkers
, I''ve come to the conclusion I have to check for 127.0.0.1
If I use gethostbyaddr(127.0.0.1) and don''t find it, I should be connected to the inet. Is this right?
Wwhat technique should I use when I''m connected to another network?
![](smile.gif)
If I use gethostbyaddr(127.0.0.1) and don''t find it, I should be connected to the inet. Is this right?
Wwhat technique should I use when I''m connected to another network?
![](http://www.baskuenen.myweb.nl/images/title.jpg)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement