Exemple #1
0
 /// <summary>
 /// Determines whether the specified host is reachable.
 /// </summary>
 /// <param name="host">The host.</param>
 /// <param name="timeout">The timeout.</param>
 public Task <bool> IsReachable(string host, TimeSpan timeout)
 {
     return(Task.Run(() => Reachability.IsHostReachable(host)));
 }
Exemple #2
0
 /// <summary>
 /// Determines whether [is reachable by wifi] [the specified host].
 /// </summary>
 /// <param name="host">The host.</param>
 /// <param name="timeout">The timeout.</param>
 public Task <bool> IsReachableByWifi(string host, TimeSpan timeout)
 {
     return(Task.Run(() => Reachability.RemoteHostStatus(host) == NetworkStatus.ReachableViaWiFiNetwork));
 }
Exemple #3
0
 /// <summary>
 /// Internets the connection status.
 /// </summary>
 /// <returns>NetworkStatus.</returns>
 public NetworkStatus InternetConnectionStatus()
 {
     return(Reachability.InternetConnectionStatus());
 }