0

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

  • possible duplicate of [How to find server is reachable with Reachability code in iPhone?](http://stackoverflow.com/questions/5819088/how-to-find-server-is-reachable-with-reachability-code-in-iphone) – Abizern Jun 20 '11 at 13:16

2 Answers2

3

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

Wolfgang Schreurs
  • 11,779
  • 7
  • 51
  • 92
0

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

DivineDesert
  • 6,924
  • 1
  • 29
  • 61