Multithreaded server implementation.

This commit is contained in:
Bas de Jong
2025-09-11 16:09:18 +02:00
parent bb0abe7937
commit 11556ad363
3 changed files with 22 additions and 39 deletions

View File

@@ -168,10 +168,18 @@ public class Server extends Thread {
public void run() {
while (true) {
// logger.info(server.getIp());
logger.info(this.isAlive());
logger.info("Ik ben Bas, hallo");
try {
sleep(1000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
}
public static void start(String backend, String ip, String port) {
new Server(ServerBackend.valueOf(backend.toUpperCase()), ip, port).start();
}
}