version 1.11.4.2, 2013/01/17 17:01:51
|
version 1.15, 2013/08/22 15:31:09
|
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(100, 2, 1024 * 10, "127.0.0.1", 11111, SOCK_DGRAM); | if (argc > 1) |
// cli = rpc_cli_openClient(100, 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 88 int main(int argc, char **argv)
|
Line 90 int main(int argc, char **argv)
|
AIT_SET_STR(v, "gniah_blah SHMINK!"); |
AIT_SET_STR(v, "gniah_blah SHMINK!"); |
v = array(valz, 2, ait_val_t*); |
v = array(valz, 2, ait_val_t*); |
AIT_NEW_BLOB(v, 512); |
AIT_NEW_BLOB(v, 512); |
if (rpc_cli_sendBLOB(cli2, v, blob43) == -1) { | if (rpc_cli_sendBLOB(cli2, v, blob43, 0) == -1) { |
printf("!!!!! blob error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); |
printf("!!!!! blob error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); |
ait_freeVars(&valz); |
ait_freeVars(&valz); |
rpc_cli_closeBLOBClient(&cli2); |
rpc_cli_closeBLOBClient(&cli2); |
Line 125 int main(int argc, char **argv)
|
Line 127 int main(int argc, char **argv)
|
v = array(arr, 2, ait_val_t*); |
v = array(arr, 2, ait_val_t*); |
printf("ret_val2:: is_empty? %d %s len=%d type=%d\n", |
printf("ret_val2:: is_empty? %d %s len=%d type=%d\n", |
AIT_ISEMPTY(v), AIT_GET_STR(v), AIT_LEN(v), AIT_TYPE(v)); |
AIT_ISEMPTY(v), AIT_GET_STR(v), AIT_LEN(v), AIT_TYPE(v)); |
|
//#if 0 |
v = array(arr, 3, ait_val_t*); |
v = array(arr, 3, ait_val_t*); |
printf("ret_val3:: %X %d\n", AIT_GET_BLOB(v), AIT_LEN(v)); |
printf("ret_val3:: %X %d\n", AIT_GET_BLOB(v), AIT_LEN(v)); |
printf("test found blob=%d\n", rpc_cli_getBLOB(cli2, v, (void**) &mem)); |
printf("test found blob=%d\n", rpc_cli_getBLOB(cli2, v, (void**) &mem)); |
Line 133 int main(int argc, char **argv)
|
Line 136 int main(int argc, char **argv)
|
printf("+++++++ BLOB=%s", mem); |
printf("+++++++ BLOB=%s", mem); |
e_free(mem); |
e_free(mem); |
} |
} |
|
//#endif |
rpc_cli_freeCall(&arr); |
rpc_cli_freeCall(&arr); |
} |
} |
} |
} |
Line 242 int main(int argc, char **argv)
|
Line 246 int main(int argc, char **argv)
|
return 6; |
return 6; |
} |
} |
printf("c=%d v=%p\n", array_Size(arr), arr); |
printf("c=%d v=%p\n", array_Size(arr), arr); |
printf("session(%d:%d:%d) clients=%d\n", (uint8_t) AIT_GET_U8(array(arr, 0, ait_val_t*)), | printf("session(%d:%d) clients=%d\n", (uint8_t) AIT_GET_U8(array(arr, 0, ait_val_t*)), |
(uint32_t) AIT_GET_U32(array(arr, 1, ait_val_t*)), | AIT_GET_U8(array(arr, 1, ait_val_t*)), AIT_GET_I32(array(arr, 2, ait_val_t*))); |
AIT_GET_U8(array(arr, 2, ait_val_t*)), AIT_GET_I32(array(arr, 3, 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); |