开发者

detecting devices connected to my network

开发者 https://www.devze.com 2023-02-16 20:56 出处:网络
I need Java c开发者_JS百科ode to detect current connected devices to my network. I tried the following idea :

I need Java c开发者_JS百科ode to detect current connected devices to my network. I tried the following idea : - for all possible addresses check if this address is connected ( 254 loop ) - to speed up this process I created a thread for each check to make them run in parallel

Is there any way more efficient ??


Well there are lots of ways of detecting networked devices and you give no specifics on the nature of your situation.

The simplest (and most simplistic) approach I can think of would be to ping the broadcast address of your IP network and then consult the system's ARP table. Unfortunately I have no particular strategy for accessing the ARP table from Java to suggest.

0

精彩评论

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

关注公众号