version 1.13.4.4, 2013/07/16 13:02:52
|
version 1.16, 2013/08/23 13:53:15
|
Line 16 int main(int argc, char **argv)
|
Line 16 int main(int argc, char **argv)
|
// printf("MM model=%d\n", elwix_mm_inuse()); |
// printf("MM model=%d\n", elwix_mm_inuse()); |
// getchar(); |
// getchar(); |
|
|
cli = rpc_cli_openClient(2, 1024 * 10, "127.0.0.1", 11111, SOCK_DGRAM); | if (argc > 1) |
// cli = rpc_cli_openClient(2, 1024 * 10, "127.0.0.1", 11111, 0); | cli = rpc_cli_openClient(2, 1024 * 10, "127.0.0.1", 11111, SOCK_DGRAM); |
| else |
| cli = rpc_cli_openClient(2, 1024 * 10, "127.0.0.1", 11111, 0); |
if (!cli) { |
if (!cli) { |
printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); |
printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); |
e_free(blob43); |
e_free(blob43); |
Line 32 int main(int argc, char **argv)
|
Line 34 int main(int argc, char **argv)
|
return 1; |
return 1; |
} |
} |
|
|
|
//#if 0 |
printf("\n\n1 pass>>> RPC ping\n\n"); |
printf("\n\n1 pass>>> RPC ping\n\n"); |
for (i = 0; i < 100000; i++) { |
for (i = 0; i < 100000; i++) { |
gettimeofday(&before, NULL); |
gettimeofday(&before, NULL); |
Line 147 int main(int argc, char **argv)
|
Line 150 int main(int argc, char **argv)
|
} |
} |
printf("return=%d aaa arr=%p\n", arr ? array_Size(arr) : 42424242, arr); |
printf("return=%d aaa arr=%p\n", arr ? array_Size(arr) : 42424242, arr); |
|
|
|
if (rpc_cli_execCall(cli, RPC_REPLY, RC_big, NULL, &arr) < 0) { |
|
printf("error:: \"big\" errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); |
|
} else |
|
printf("return=%d big arr=%p\n", arr ? array_Size(arr) : 42424242, arr); |
|
ait_freeVars(&arr); |
|
|
|
|
valz = ait_allocVars(1); |
valz = ait_allocVars(1); |
v = array(valz, 0, ait_val_t*); |
v = array(valz, 0, ait_val_t*); |
AIT_SET_DATA(v, "1234567890", 11); |
AIT_SET_DATA(v, "1234567890", 11); |
Line 248 int main(int argc, char **argv)
|
Line 257 int main(int argc, char **argv)
|
AIT_GET_U8(array(arr, 1, ait_val_t*)), AIT_GET_I32(array(arr, 2, ait_val_t*))); |
AIT_GET_U8(array(arr, 1, ait_val_t*)), AIT_GET_I32(array(arr, 2, ait_val_t*))); |
rpc_cli_freeCall(&arr); |
rpc_cli_freeCall(&arr); |
|
|
if (argc > 1) | printf("shutdown rpc server? (y/n): "); |
| if (getchar() == 'y') |
rpc_cli_execCall(cli, RPC_NOREPLY, CALL_SRVSHUTDOWN, NULL, NULL); |
rpc_cli_execCall(cli, RPC_NOREPLY, CALL_SRVSHUTDOWN, NULL, NULL); |
|
|
rpc_cli_closeBLOBClient(&cli2); |
rpc_cli_closeBLOBClient(&cli2); |