mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
new: support set maxRetryCount of server reconnection opt: server detail UI opt: server provider opt: `ssh` page on Android
23 lines
508 B
Dart
23 lines
508 B
Dart
import 'package:dartssh2/dartssh2.dart';
|
|
import 'package:toolbox/data/model/server/server_private_info.dart';
|
|
import 'package:toolbox/data/model/server/server_status.dart';
|
|
|
|
class Server {
|
|
ServerPrivateInfo spi;
|
|
ServerStatus status;
|
|
SSHClient? client;
|
|
ServerState cs;
|
|
|
|
Server(this.spi, this.status, this.client, this.cs);
|
|
}
|
|
|
|
enum ServerState {
|
|
disconnected,
|
|
connecting,
|
|
connected,
|
|
failed;
|
|
|
|
bool get shouldConnect =>
|
|
this == ServerState.disconnected || this == ServerState.failed;
|
|
}
|