i started in this project...
i have chat program and it has a server program that accepts connection request from clients through sockets..
every time a new socket connects to the server the server program creates a new thread for that specific client..
then that client-specific thread handles the receiving and sending of messages...
first question: how can i make the client-specific thread determine to whom the message is for...
next question:i been having problems with using
BufferedReader reader=new BufferedReader(new InputStreamReader(s.getInputStreamReader()));
String message=reader.readLine()//this line seems to cause all the problem, the execution of my client-specific thread seems to stop when it execute this line of code...
//i use this line in accepting message to the socket either from the client going to the server or vice versa...
//there is this error that says that the connection was reset...
thanks in advance...