diff --git a/src/main/java/ClientHandler.java b/src/main/java/ClientHandler.java index 5d943af..fa4b924 100644 --- a/src/main/java/ClientHandler.java +++ b/src/main/java/ClientHandler.java @@ -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 } }