From 33a9aa7e469ab9546cda18fa9d6673a4f4f24f33 Mon Sep 17 00:00:00 2001 From: Paul Kattenborn Date: Wed, 7 Feb 2024 00:13:02 +0100 Subject: [PATCH] Einbinden von ClientHandler --- src/main/java/ChatServer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/ChatServer.java b/src/main/java/ChatServer.java index 0fd0416..0327ad7 100644 --- a/src/main/java/ChatServer.java +++ b/src/main/java/ChatServer.java @@ -10,10 +10,12 @@ public class ChatServer { try { serverSocket = new ServerSocket(port); System.out.println("Started ChatServer on port " + port); - + + while(true) { Socket connectionToClient = serverSocket.accept(); - + ClientHandler client = new ClientHandler(this, connectionToClient); System.out.println("Accepted new Client"); + } } catch (IOException e) { e.printStackTrace(); }