Browse Source

refactoring: Einrückungen

remotes/origin/feature/client/make-input-field-buttons-interactive
fdai7599 11 months ago
parent
commit
a268c06c87
  1. 24
      src/main/java/ChatServer.java

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

Loading…
Cancel
Save