I'd like to try to make a script of mine reeeeaaly easy to deploy and configure, by allowing it to automatically figure out where its server is located, connecting to a certain port on that server, identify itself by using the client's IP (or something), get the matching configuration via the connection, and start up.
I've got a problem with the first step. How can i elegantly 'find' a server? The obvious solution would be to ping all machines on the subnet, try to connect to the specified port, and if that is successful, assume that that machine is the server. Is there a more elegant way to do this? Maybe using broadcast packets or something?