Getting IP addresses of the PC's available on wifi network in android

Sam Holder

can you not multicast a UDP packet on the network which the server listens for and responds to with a packet containing the ip address of the server in order to set up the connection?

You should be able to find help on that topic, with some options here here and here