--- libaitrpc/example/tcli.c 2012/05/17 12:52:29 1.7.4.4 +++ libaitrpc/example/tcli.c 2012/05/17 14:22:24 1.7.4.7 @@ -20,11 +20,20 @@ int main() return 1; } -#if 0 + cli2 = rpc_cli_openBLOBClient(cli, 0); + if (!cli2) { + printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); + rpc_cli_closeClient(&cli); + free(blob43); + return 1; + } + + /* for (i = 0; i < 10000; i++) { gettimeofday(&before, NULL); if (rpc_cli_execCall(cli, RPC_REPLY, CALL_SRVPING, NULL, &arr)) { printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); + rpc_cli_closeBLOBClient(&cli2); rpc_cli_closeClient(&cli); free(blob43); return 127; @@ -34,12 +43,12 @@ int main() i, (after.tv_sec - before.tv_sec) + (after.tv_usec - before.tv_usec) / 1.e6); io_freeVars(&arr); } -#endif printf("\n\n>>> RPC ping without reply!!!\n\n"); for (i = 0; i < 10000; i++) { gettimeofday(&before, NULL); if (rpc_cli_execCall(cli, RPC_NOREPLY, CALL_SRVPING, NULL, &arr)) { printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); + rpc_cli_closeBLOBClient(&cli2); rpc_cli_closeClient(&cli); free(blob43); return 127; @@ -49,15 +58,8 @@ int main() printf("RPC ping #%d --- %f\n", i, (after.tv_sec - before.tv_sec) + (after.tv_usec - before.tv_usec) / 1.e6); } + */ - cli2 = rpc_cli_openBLOBClient(cli, 0); - if (!cli2) { - printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); - rpc_cli_closeClient(&cli); - free(blob43); - return 1; - } - memset(blob43, 0, 512); strlcpy(blob43, "aaaaaaaaaaaaaaa cddddddddddddddd zzzzzzzzzzzzzzzzzzzzz !!!!\n\n\n675675676...\n", 512); @@ -68,6 +70,7 @@ int main() AIT_SET_STR(v, "gniah_blah SHMINK!"); v = io_array(valz, 2, ait_val_t*); AIT_NEW_BLOB(v, 512); + printf("aaaaaaaaaaaaaaaaaaaaa\n"); if (rpc_cli_sendBLOB(cli2, v, blob43) == -1) { printf("!!!!! blob error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); io_freeVars(&valz);