sendFunction method

void sendFunction(
  1. int function,
  2. Uint8List data, {
  3. Channel channel = kAnyChannel,
  4. Channel? receiver,
  5. bool forceLocal = false,
})

Implementation

void sendFunction(int function, Uint8List data,
        {Channel channel = kAnyChannel,
        Channel? receiver,
        bool forceLocal = false}) =>
    sendMessage(
        RpcNetworkerPacket(
            function: function,
            data: data,
            channel:
                isServer ? (receiver ?? defaultReceiverChannel) : channel),
        isServer ? channel : (receiver ?? defaultReceiverChannel));