コード例 #1
0
 public Task <bool> IsPortReachable(string host, int port = 80, int msTimeout = 5000)
 {
     return(new Task <bool>(() => Reachability.IsHostReachable(host)));
 }
コード例 #2
0
 public override Task <bool> GetHostReachableAsync(string host,
                                                   CancellationToken token = default(CancellationToken))
 {
     return(Task.Run(() => Reachability.IsHostReachable(host), token));
 }