User`s guide

Developing LUC Applications [5]
else if (lucError < LUC_ERR_MAX)
// LUC library generated error code
else
// user remote function return value
//
// An asynchronous (non-blocking) call.
// Return data is not supported for asynchronous callers.
//
void *myMeaningfulHandle = 0xf00;
lucError = client->remoteCall(serverEndpointId,
serviceType,
serviceFunctionIndex,
NULL, // void *inputData,
0, // size_t inputDataLen,
myMeaningfulHandle,
ClientCompletionHandler);
// The application can do other work while the remote call is in progress.
// ClientCompletionHandler will fire in some other context at a later time.
// When the application is finished with the endpoint object, it should
// be stopped.
lucError = client->stopService();
// and destroyed.
delete client;
return;
}
// ServerQueryEngineAliveFunction:
// implements {LUC_ST_QueryEngine, QUERY_ENGINE_ALIVE_FCTN_ID}
// conforms to LUC_RPC_Function_InOut prototype
//
luc_error_t ServerQueryEngineAliveFunction(void * inData,
u_int64_t inDataLen,
void ** outData,
u_int64_t * outDataLen,
void ** completionArg,
LUC_Mem_Avail_Completion * completionFctn,
luc_endpoint_id_t callerEndpoint)
{
// This function is a simple case. It does not accept or return any data.
if (*outData)
*outData = NULL;
if (*outDataLen)
*outDataLen = 0;
// Since this function is not returning data, it does not need to register
// a memory-available (or dereference) handler.
*completionFctn = NULL;
return LUC_ERR_OK; // successful return code
}
S247920 59