callFunction method

bool callFunction(
  1. int function,
  2. Uint8List data, {
  3. Channel sender = kAnyChannel,
  4. bool forceLocal = false,
})

Implementation

bool callFunction(
  int function,
  Uint8List data, {
  Channel sender = kAnyChannel,
  bool forceLocal = false,
}) {
  final rpcFunction = functions[function];
  if (rpcFunction == null) return false;
  if (!rpcFunction.shouldRun(sender, forceLocal: forceLocal)) return false;
  rpcFunction.pipe.sendMessage(data);
  return true;
}