예제 #1
0
        static bool validate(int timeout)
        {
            bool OK = false;

            try
            {
                TimeoutWebClient wc = new TimeoutWebClient {
                    Timeout = timeout
                };
                wc.Proxy = new WebProxy(ip[counter], Convert.ToInt32(port[counter]));
                wc.DownloadString("http://google.com/ncr");
                OK = true;
            }
            catch { }
            return(OK);
        }
예제 #2
0
        static bool validate(int timeout)
        {
            bool OK = false;
            try
            {
                TimeoutWebClient wc = new TimeoutWebClient { Timeout = timeout };
                wc.Proxy = new WebProxy(ip[counter], Convert.ToInt32(port[counter]));
                wc.DownloadString("http://google.com/ncr");
                OK = true;
            }
            catch { }
            return OK;

        }