posted 20 years ago
I am trying to write a chat server and want to assign a unique id to each client that connects to the server. Then, display that id while displaying the text messages.
Ex:
Client1>Hi
Client2>Hello
Can someone please suggest how can I do that? I have three major classes: Client.java (which takes care of initiating a connection to the server), ServerListener.java (which keeps listening to the coming requests), and ServerHandler.java (which takes care of processing the requests).
Thanks in advance,
Manasa