For the standard clnt_call() call, you need to make two changes to get an asynchronous (or "batch") RPC call: an argument indicating that the pointer to the XDR function for the response data structure must be NULL , and the timeout argument must be zero, i.e. .
static struct timeval ZERO_TIMEOUT = { 0, 0 }; static char clnt_res; memset((char*)&clnt_res, 0, sizeof(clnt_res); if (clnt_call(clnt, messageType, (xdrproc_t)xdr_messageType_t, (caddr_t)argp, (xdrproc_t)NULL, (caddr_t)&clnt_res, ZERO_TIMEOUT) != RPC_SUCCESS) { ... }
source share