Client server connection

hello,

im stumped to find an algorithm on how i can get a username by using a server/client connection. wait, let me rephrase that - i have made a server which supports multi clients. the client part loads up a gui chat app and connectes to the server. my question is how do i get the server to display the clients name in the "names" list?

the client app asks for a username before it connects, but how does the server know that the thread for user x is the username for user x?

i hope this makes some sense..

thanks

[548 byte] By [Vojnik_Srecea] at [2007-9-29 23:53:49]
# 1
When your server accepts a connection it spawns a new thread to handle that connection. The clientthen sends the username/password details. The thread which recieves these is the thread that is handling that client.
matfuda at 2007-7-16 4:21:13 > top of Java-index,Other Topics,Algorithms...