Proxy > Gmail Facebook Yahoo!

Check Internet connection notifier




Here is a tool for you to check if internet connection available or not. The tool uses below code for connection detection:
Download Zip
private bool IsInternetAvailable()
        {
            bool ret = false;
 
            try
            {
                HttpWebRequest req = (HttpWebRequest)
			HttpWebRequest.Create("http://www.google.com/");
                HttpWebResponse res 
			= (HttpWebResponse)req.GetResponse();
                if (res.StatusCode == HttpStatusCode.OK)
                {
                    ret = true;
                }
                else
                {
                    ret = false;
                }
                res.Close();
            }
            catch
            {
                ret = false;
            }
 
            return ret;
        }


Responses

0 Respones to "Check Internet connection notifier"


Send mail to your Friends.  

Expert Feed

 
Return to top of page Copyright © 2011 | My Code Logic Designed by Suneel Kumar