better network structure
Some checks failed
Linux arm64 / Build (push) Has been cancelled

This commit is contained in:
2025-01-23 22:24:23 +01:00
parent 5e99cd92df
commit bfe98a2cf0
22 changed files with 248 additions and 93 deletions

View File

@@ -0,0 +1,28 @@
package network.server;
public class ServerLogicThread extends Thread {
private final Server server;
public ServerLogicThread(Server server) {
this.server = server;
}
public void cancel() {
interrupt();
}
@Override
public void run() {
while (!interrupted()) {
server.update();
try {
Thread.sleep(50);
} catch (InterruptedException e) {
// e.printStackTrace();
break;
}
}
}
}