Is it wise to use Reachability Class(from Apple) to check for a remote host\'s availability ? say for example, www.google.com
or should I use
NSStri
Here is a good way to check if host is reachable:
NSURLResponse *response=nil;
NSError *error=nil;
NSData *data = nil;
NSURLRequest *request = [NSURLRequest requestWithURL:your_url];
data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
If host is offline you will receive some error code in error, nil in data and nil in response variables.
If host is online and responds there will be some response, data, and error==nil.