Hi Guys,
I am new here and am hoping that you may be able to give me a few pointers.
I am writing a chat application in
Java. I have one server which starts a new
thread for each new client that connects. So far all pretty straight forward.
I have a client that connects to the server and sends over a username. The username is stored in the new thread instance. This way the server can distribute the chat name as well as the conversation text to all the clients so everyone knows who is talking.
That general chat bit works great but I want to have a list on every client that is always up to date containing the names of all users currently online. I also want to add extra functionality like text color perhaps.
What approach should I take to achieve this?? What would be the most sensible way of doing it?
I am using text streams to send all this information between server and clients. How can I separate the "conversation text" from all streams that contain system information like a users text colour?
Should I keep a list off all current users on every client and store everyones settings in there? If I do this how can I keep it updated?
Thanks in advance for your comments.
Trevor