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) {