VXworks下RPC通信,网络不好,clnt_call()阻塞了,不返回。
如题。
static struct timeval TIMEOUT = { 25, 0 };
static PATUT_RESULT res;
bzero((char *)&res, sizeof(res));
if (clnt_call(clnt, PATUResponseFrame, xdr_PATUT_RESPONSE_PARAM, argp, xdr_PATUT_RESULT, &res, TIMEOUT) != RPC_SUCCESS) {
return (NULL);
}
代码如上?我把超时间隔25秒改成1秒,好像还是阻塞很久,不起作用。 各位大侠,有经验的,请给指点一下,谢谢。