heartbeat method

void heartbeat()

Just call the Seald server, without doing anything. This may be used, for example, to verify that the current instance has a valid identity.

Implementation

void heartbeat() {
  if (_closed) {
    throw SealdException(
        code: "INSTANCE_CLOSED",
        id: "FLUTTER_INSTANCE_CLOSED",
        description: "Instance already closed.");
  }
  final Pointer<Pointer<NativeSealdError>> err =
      calloc<Pointer<NativeSealdError>>();

  final int resultCode = _bindings.SealdSdk_Heartbeat(_ptr.pointer(), err);

  if (resultCode != 0) {
    throw SealdException._fromCPtr(err);
  } else {
    calloc.free(err);
  }
}