Example #1
0
File: IpMine.cs Project: Nucs/nlib
        protected override string Mine(string url, CancellationToken token)
        {
            var h = new FastWebClient()
            {
                Timeout = -1
            };

            return(attemptparse(h.DownloadString(new Uri(url))));
        }
Example #2
0
        private static bool OpenReadToGoogle() {
            try {
                var _onlinechecker = new FastWebClient() { Timeout = 5000 };

                using (_onlinechecker.OpenRead("http://www.google.com")) { }
                return true;
            } catch (Exception) {
                return false;
            }
        }
Example #3
0
        private static bool OpenReadToGoogle()
        {
            try {
                var _onlinechecker = new FastWebClient()
                {
                    Timeout = 5000
                };

                using (_onlinechecker.OpenRead("http://www.google.com")) { }
                return(true);
            } catch (Exception) {
                return(false);
            }
        }