Accept Connect Request and Read Broadcast
Hello, this is my first time on this forum. I'm looking for some advice because I'm not sure of the best way to proceed. Here it goes.....
I have a client/server application up and running. At this point I'd like to allow the client to broadcast on the local network to find out which computer is the server. That way it can connect with the IP address retrieved and the user doesn't have to worry about knowing the servers IP address.
Right now my server simply sits and waits for connect requests and creates a thread for each one that comes in (since this is for a room full of 20 computers the multi-threading way I hope works out fine).
I've looked over the API for MulticastSocket.
My questions are...
Is multicastSocket the preferred or only way to read in broadcasts?
Should I add a thread for reading in broadcasts? Is this a good way to do it?
If there are two threads one for ServerSocket and one for MulticastSocker should they use different ports?
Any advice beyond answering the questions above is welcome.