network: process time out
This commit is contained in:
@@ -20,9 +20,14 @@ public class ClientConnexion implements PacketVisitor, PacketHandler {
|
||||
this.serverAddress = serverAddress;
|
||||
this.socket = socket;
|
||||
this.callback = callback;
|
||||
this.socket.onClose.connect(this::onSocketClose);
|
||||
this.socket.addHandler(this);
|
||||
}
|
||||
|
||||
private void onSocketClose() {
|
||||
this.callback.handleConnexionError();
|
||||
}
|
||||
|
||||
public void close() {
|
||||
this.socket.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user