A quick routine that will scan the local subnet for a valid host.
It will verify it is a valid host by sending a packet of "ABCD"
If the host responds sending "WXYZ" then it is a valid host.
The communication port will be 10444
For example if you machine has ip address:
[url removed, login to view]
you will attempt to send the "ABCD" to ip address 192.168.10.1- [url removed, login to view] and 192.168.10.26- [url removed, login to view] looking for a host machine.
(skipping your own ip address of [url removed, login to view])
Its possible more than host will exist. Build a vector of all matching ip addresses, along with the hosts name if you can get the hosts name.
The code should be written so that it is fast, and can be run in parallel to be faster (threaded if necessary).
This code will run on an Android. Nice if you have the android eclipse project on eclipse but not a requirement.