|
|
@ -54,11 +54,12 @@ public class ClientHandler implements Runnable { |
|
|
|
if (toClientWriter != null) { |
|
|
|
toClientWriter.close(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void sendMessage(String message) { |
|
|
|
toClientWriter.println(message); |
|
|
|
toClientWriter.flush(); |
|
|
|
|
|
|
|
//Method to send a message to the client |
|
|
|
public void sendMessage(String message) { |
|
|
|
toClientWriter.println(message); // Send the message to the client |
|
|
|
toClientWriter.flush(); // Flush the stream |
|
|
|
} |
|
|
|
} |