mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 10:54:51 +00:00
Multithreaded server implementation.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user