My apologies if this is a trivial question.
I recently started programming on Android, and I'm writing a simple application that allows you to use your Android device as a controller for your Windows PC. In particular, it allows the user to do such things as turn off the machine, make it sleep, restart it, etc. Etc. I am currently using a python library called CherryPy as a server on a Windows computer to make actual win32api calls to execute the required function. I'm not sure how to detect (dynamically) which machine on the network actually hosts the server. Everything works fine if I hard code my public IP address in an Android app, but obviously this is much less than just ideal. I thought that the user manually enters their public IP address of their computers in the application, but if there is a way, say, send a quick message to all the machines in WiFi and check the preprogrammed response that my Python server would send, that would be great. Is it possible?
Thanks in advance guys.
source share