开发者

How to check ip is available in network or not?

I have an list of IP which I am getting using UDP broadcasting, so on the bases of Alive/Death packet ,i got to know whether user alive or went off.

But i have an single case suppose user went out from network before sent death packet, then how can I detect user live or not.

- Solution which i have:

So for this purpose I m running an thread ,in which i send an dummy data to all user(from ip list), so if any ip is not available then it respond IO exception. but it 开发者_开发百科taking to much time to identify ip in network.

pls suggest me if have any faster solution.


try pinging:

Ping

and this article:

Java Ping command

Hope this helps

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜