more stable connexion
Some checks failed
Linux arm64 / Build (push) Failing after 5m1s

This commit is contained in:
2025-01-26 14:54:46 +01:00
parent e51cc23459
commit 47dc35ebfa
7 changed files with 64 additions and 12 deletions

View File

@@ -16,6 +16,8 @@ public class Client {
public final Signal onDisconnect = new Signal();
public final Signal onClosed = new Signal();
String disconnectReason = null;
public Client(String address, short port) throws UnknownHostException, IOException {
this.clientConnection = new ClientConnexion(address, port, this);
this.game = new Game();
@@ -39,6 +41,10 @@ public class Client {
return game;
}
public String getDisconnectReason() {
return disconnectReason;
}
public void forceDisconnect() {
this.onClosed.emit();
stop();