enqueueRPC method

void enqueueRPC(
  1. DataPackage rpcRequest
)

Implementation

void enqueueRPC(DataPackage rpcRequest)
{
    if(rpcRequest.targetModule != this._modId)
    {
        moduleError("Failed to execute RPC request. RPC is targeted for Module \"" + rpcRequest.targetModule +
              "\", but we are Module \"" + this._modId + "\".");
        return;
    }

    bool result = this._remoteFunctionRunnableHandler.executeRemoteFunctionRunnable(rpcRequest);
    if(!result)
    {
        moduleError("Failed to execute rpcRequest");
        return;
    }
}