0
我使用下面的代码来测试网络连接是否可用,如何更快地实现可达性?
NSLog(@"Testing internet connection");
Reachability *internetReach = [Reachability reachabilityWithHostName:@"google.com"];
if([internetReach currentReachabilityStatus] == NotReachable) {
NSLog(@"Internet connection is not Rechable");
} else {
NSLog(@"Internet connection is Rechable");
}
但它占用太多时间来检验了互联网连接,是有什么办法可以减少时间?
由于