I am currently working on an application which has some networking going on.
A user can start a local server and others can connect to it if they know the IP-adress of the host.
I would like to make this a little bit simpler. Ideally the clients could scan for any hosts which are available in the local area network. The user could then select the host from a list and connect to it automatically without having to know the IP-adress at all.
So my question is: How do I implement this "scanning" for local hosts? I would rather not try to open a Connection to every possible LAN-Adress and see which one gets accepted and which one wont be.
Some kind of LAN broadcasting (from the server to all possible clients) could also be possible I guess;
(I am using standard Java sockets / serverSockets by the way)
Thank you in advance.