From c15ed63353828500275e90e7eac60d5780599576 Mon Sep 17 00:00:00 2001 From: Paul Kattenborn Date: Wed, 7 Feb 2024 00:33:20 +0100 Subject: [PATCH] Einbinden von sendMessage in server --- src/main/java/ChatServer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/ChatServer.java b/src/main/java/ChatServer.java index c647fe6..3ece54e 100644 --- a/src/main/java/ChatServer.java +++ b/src/main/java/ChatServer.java @@ -29,7 +29,10 @@ public class ChatServer { } - public void broadcastMessage(String s) { + public void broadcastMessage(String message) { + for (ClientHandler client : clients) { + client.sendMessage(message); + } }