Hello,
During my years at the university I had a personal project of making a simple chat program in Java, using TCP sockets. The project was only for educational purposes.
One thing I wasn't very happy with was that a client had to know the IP of the server in order to connect to it. So I got to thinking it would be nice if the clients could be able to detect if there was any chat servers available on the network.
How can I accomplish such a mechanism? If you could point me in the right direction I'd be grateful. :-)
I'm thinking the server would have to do some kind of broadcast, but I'm not sure how to do this.
PS: I know there probably are other/better ways of doing this, but for now I'm specifically interested in how to make a client detect servers on the network.
And by server I mean the server-side part of the chat application, not like a Tomcat server.