Search code examples
iphoneiospingbonjour

iOS/iPhone How to ping a server ip address?


everyone

I create a Bonjour browser to find local server,I can collect many host name,and parser the IP.

But when the network is not stable , I can't find any server in local network...

But if you use ping to find server , it never failed to get server IP

Is there a way to ping external server without using Bonjour or give a host name ???

If I can't get the host name now , how to get all the server IP in local network ???

Thanks for all reply or answers.

Here is the search result I found

Checking For Internet Connectivity in Objective C

Ping with iPhone SDK

Webber


Solution

  • If you want ping your local host server with IP address I recommend: SimplePingerHelper .

    For more information about this class go to: http://www.splinter.com.au/how-to-ping-a-server-in-objective-c-iphone/

    Add method to perform every second and delegate to check success or failure.