开发者

iOS/iPhone How to ping a server ip address?

开发者 https://www.devze.com 2023-03-22 09:55 出处:网络
everyone I create a Bonjour browser to find local server,I can collect many host name,and parser the IP.

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 Obj开发者_JS百科ective C

Ping with iPhone SDK

Webber


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号