MonoMobile.Views.Reachability.IsHostReachable C# (CSharp) Method

IsHostReachable() public static method

public static IsHostReachable ( string host ) : bool
host string
return bool
		public static bool IsHostReachable(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;
		}