W
wanderin
I try to program a chat, and I can send the message to the server.
But, unfortunately, my server can't send back the message it received.
Althought I put the necessary code, I think:
try{
BufferedReader recep = new BufferedReader(
new
InputStreamReader(SOCK.getInputStream()));
while (true){
String message = recep.readLine();
OUT_BUF.println(message);
}
}
I notify the OUT_BUF parameter refers to the PrintWriter class.
As you can see, the message received should be returned to the
clients.
Thank you for helping.
But, unfortunately, my server can't send back the message it received.
Althought I put the necessary code, I think:
try{
BufferedReader recep = new BufferedReader(
new
InputStreamReader(SOCK.getInputStream()));
while (true){
String message = recep.readLine();
OUT_BUF.println(message);
}
}
I notify the OUT_BUF parameter refers to the PrintWriter class.
As you can see, the message received should be returned to the
clients.
Thank you for helping.