--- libaitrpc/example/tcli.c 2011/11/03 15:32:21 1.5 +++ libaitrpc/example/tcli.c 2012/03/28 01:17:09 1.6.2.1 @@ -13,7 +13,7 @@ int main() array_t *valz, *arr; char *mem, *blob43 = malloc(512); - cli = rpc_cli_openClient(100, 2, 1024 * 10, AF_INET, "127.0.0.1", 11111); + cli = rpc_cli_openClient(100, 2, 1024 * 10, 0, AF_INET, "127.0.0.1", 11111); // cli = rpc_cli_openClient(100, 2, AF_LOCAL, "0.0.0.0", 11111); if (!cli) { printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); @@ -84,6 +84,16 @@ int main() return 3; } printf("return=%d aaa arr=%p\n", arr ? io_arraySize(arr) : 42424242, arr); + + valz = io_allocVars(1); + v = io_array(valz, 0, ait_val_t*); + AIT_SET_DATA(v, "1234567890", 11); + io_arraySet(valz, 0, v); + if (rpc_cli_execCall(cli, NULL, "xxx", valz, &arr) < 0) { + printf("error:: \"xxx\" errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); + return 3; + } + printf("return=%d xxx arr=%p\n", arr ? io_arraySize(arr) : 42424242, arr); if (rpc_cli_execCall(cli, NULL, CALL_SRVCLIENTS, NULL, &arr) < 0) { printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError());