outgoingMessageCount method

int outgoingMessageCount({
  1. int limit = 0,
})

Count the number of messages in the outgoing queue, i.e. those waiting to be sent to the server.

Note: This calls uses a (read) transaction internally:

  1. It's not just a "cheap" return of a single number. While this will still be fast, avoid calling this function excessively.
  2. the result follows transaction view semantics, thus it may not always match the actual value.

Implementation

int outgoingMessageCount({int limit = 0}) {
  final count = malloc<Uint64>();
  try {
    checkObx(C.sync_outgoing_message_count(_ptr, limit, count));
    return count.value;
  } finally {
    malloc.free(count);
  }
}