While reviewing some code, I found a snippet for checking internet connection, like this
I found this way of internet connection availablilty many times, but most of the times it was google.com :) So I thought of writing the correct way (at least from my prespective) of verifying internet connection. For this I am using a WIN32 API, InternetGetConnectedState method, from wininet.dll. And here is the snippet.
Happy Programming :)
What do you think? I would like to hear your thoughts, suggestions, and questions in the comments section below.