reboot method

Future<bool> reboot({
  1. int timeout = 5,
})
inherited

重启指令

Implementation

Future<bool> reboot({int timeout = 5}) async {
  bool ret = await writeCgi("reboot.cgi?", timeout: timeout);
  if (ret) {
    CommandResult result = await waitCommandResult((int cmd, Uint8List data) {
      return cmd == 24615;
    }, timeout);
    if (result.isSuccess) {
      return true;
    }
  }
  return false;
}