detecting devices connected to my network
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.
精彩评论