Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I search for a specific computer over a closed network?

I have a network of 16 computers all linked to the same switch, not connected to the internet. One of the 16 computers has a small Java app running on it along with a BlazeDS server (aka it's listening on a port for a message).

Currently, the other 15 "client" computers have to manually enter the "server" IP where the java app resides. My client app is Adobe Air, so I have no abilities there as far as scanning for the server.

I was thinking of writing a helper app / utility in Java or C++. At the very least, this app could display the IP to the user who could then input it into the Air app; sloppy but better than nothing.

I'm sure there are some tools out there that deal with this type of problem. Any ideas?

like image 920
Stephano Avatar asked Dec 02 '25 01:12

Stephano


2 Answers

I would strongly recommend using Zeroconf/Bonjour for this as it makes it trivially easy to handle decentralized "where is the others who I should know about and should know about me"?

The easiest way to do this in Java (and completely inside your own application) is with the jmdns project. http://jmdns.sourceforge.net/

like image 131
Thorbjørn Ravn Andersen Avatar answered Dec 03 '25 14:12

Thorbjørn Ravn Andersen


You could code a "discover" feature for the users that sends a heartbeat or test message to all the IP addresses in the same subnet of the current computer looking for the server that accepts / responds appropriately.

like image 44
lofte Avatar answered Dec 03 '25 15:12

lofte



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!