Browse Source

refactoring: Einrücken

remotes/origin/feature/client/make-input-field-buttons-interactive^2
Paul Kattenborn 11 months ago
parent
commit
5adf67da98
  1. 10
      src/main/java/ChatServer.java

10
src/main/java/ChatServer.java

@ -16,12 +16,12 @@ public class ChatServer {
serverSocket = new ServerSocket(port); serverSocket = new ServerSocket(port);
System.out.println("Started ChatServer on port " + port); System.out.println("Started ChatServer on port " + port);
while(true) {
while (true) {
System.out.println("waiting for new Client..."); System.out.println("waiting for new Client...");
Socket connectionToClient = serverSocket.accept();
ClientHandler client = new ClientHandler(this, connectionToClient);
clients.add(client);
System.out.println("Accepted new Client");
Socket connectionToClient = serverSocket.accept();
ClientHandler client = new ClientHandler(this, connectionToClient);
clients.add(client);
System.out.println("Accepted new Client");
} }
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();

Loading…
Cancel
Save