shouldRun method

bool shouldRun(
  1. Channel sender, {
  2. bool forceLocal = false,
})

Implementation

bool shouldRun(Channel sender, {bool forceLocal = false}) {
  if (!forceLocal && !canRunLocally && sender != kAnyChannel) return false;
  return switch (mode) {
    RpcNetworkerMode.authority => sender == kAuthorityChannel,
    RpcNetworkerMode.any => true,
    RpcNetworkerMode.disabled => false,
  };
}