FsoulForever
FsoulForever

Reputation: 1

iPhone: How can I determine a host is reachable or not?

how can I determine a host, let's say http://myhost:8080/ is reachable or not.

Upvotes: 0

Views: 281

Answers (2)

DivineDesert
DivineDesert

Reputation: 6954

Use the reachability class of apple. reachability This might help you:)

Upvotes: 0

Wolfgang Schreurs
Wolfgang Schreurs

Reputation: 11834

You could use the Reachability class from Apple, it has a method called -reachabilityWithHostName:, which will inform you if a host is reachable and which connection(s) are available (WiFi, GSM).

Check the code: http://developer.apple.com/library/ios/#samplecode/Reachability/Introduction/Intro.html

Upvotes: 3

Related Questions