Cirrious.MvvmCross.Plugins.Network.Touch.MvxReachability.StaticIsHostReachable C# (CSharp) Method

StaticIsHostReachable() public static method

public static StaticIsHostReachable ( string host ) : bool
host string
return bool
        public static bool StaticIsHostReachable(string host)
        {
            if (host == null || host.Length == 0)
                return false;

            using (var r = new NetworkReachability(host))
            {
                NetworkReachabilityFlags flags;

                if (r.TryGetFlags(out flags))
                {
                    return IsReachableWithoutRequiringConnection(flags);
                }
            }
            return false;
        }