Browse Source

refactoring: comments and identation on sendMessage Method

remotes/origin/feature/client/make-input-field-buttons-interactive
Valentin Spiroski 11 months ago
parent
commit
33b7f9e3b9
  1. 7
      src/main/java/ClientHandler.java

7
src/main/java/ClientHandler.java

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