I'm currently trying to implement a client-server chat application in Java. The brief for this project is that a number of clients should be able to connect to a central server, through which each client communicates. It should work as follows:
I've been messing around with different ways of implementing this, and would like a bit of advice on whether TCP or UDP is a better protocol to implement the communication between client and server. I was considering using UDP Multicast for the server-to-client communications, but then that's caused trouble with the UDP sockets used for the client-to-server communication. Would using TCP to communicate with the server and then UDP Multicast make sense? Or should I scrap the Multicast and just use UDP datagrams all round, with the server keeping a collection of all the clients it's received messages from to model "connections".