From a268c06c87e59318b40a3b8bbee213d6fdea8d0c Mon Sep 17 00:00:00 2001 From: fdai7599 Date: Sun, 4 Feb 2024 17:25:07 +0100 Subject: [PATCH] =?UTF-8?q?refactoring:=20Einr=C3=BCckungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/ChatServer.java | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/ChatServer.java b/src/main/java/ChatServer.java index d8bacf8..aaf8810 100644 --- a/src/main/java/ChatServer.java +++ b/src/main/java/ChatServer.java @@ -4,25 +4,25 @@ import java.net.ServerSocket; import java.net.Socket; public class ChatServer { - + private ServerSocket serverSocket; - + public ChatServer(int port) { try { - serverSocket = new ServerSocket(port); - System.out.println("Started ChatServer on port " + port); - - Socket connectionToClient = serverSocket.accept(); - - System.out.println("Accepted new Client"); - } - catch (IOException e) { + serverSocket = new ServerSocket(port); + System.out.println("Started ChatServer on port " + port); + + Socket connectionToClient = serverSocket.accept(); + + System.out.println("Accepted new Client"); + } catch (IOException e) { e.printStackTrace(); } - + } + public void broadcastMessage(String s) { - + } public static void main(String[] args) {