version 1.2, 2011/05/02 23:12:07
|
version 1.2.4.4, 2011/08/19 08:24:13
|
Line 49 int BBB(rpc_func_t *f, int in, rpc_val_t *iv)
|
Line 49 int BBB(rpc_func_t *f, int in, rpc_val_t *iv)
|
rpc_srv_unregisterBLOB(f->func_parent, RPC_GET_BLOB(&iv[2])); |
rpc_srv_unregisterBLOB(f->func_parent, RPC_GET_BLOB(&iv[2])); |
|
|
|
|
rpc_srv_declValsCall(f, 4); | rpc_srv_allocVars(f, 4); |
rpc_srv_getValsCall(f, &v); | rpc_srv_getVars(f, &v); |
RPC_SET_BUF(&v[0], "00!oo", 6); |
RPC_SET_BUF(&v[0], "00!oo", 6); |
RPC_SET_I8(&v[1], 65); |
RPC_SET_I8(&v[1], 65); |
RPC_SET_STR(&v[2], "Oho boho i cheburashka"); |
RPC_SET_STR(&v[2], "Oho boho i cheburashka"); |
Line 82 int main()
|
Line 82 int main()
|
pthread_t tid[2]; |
pthread_t tid[2]; |
int ret; |
int ret; |
|
|
srv = rpc_srv_initServer(100, 2, 1, 2, "0.0.0.0", 11111); | srv = rpc_srv_initServer(100, 2, 1, SOCK_STREAM, AF_INET, "0.0.0.0", 11111); |
if (!srv) { |
if (!srv) { |
printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); |
printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); |
return 1; |
return 1; |
} |
} |
|
|
if (rpc_srv_initBLOBServer(srv, 0, "/tmp")) { | if (rpc_srv_initBLOBServer(srv, SOCK_STREAM, 0, "/tmp")) { |
printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); |
printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); |
return 1; |
return 1; |
} |
} |
Line 112 int main()
|
Line 112 int main()
|
rpc_srv_execServer(srv); |
rpc_srv_execServer(srv); |
} |
} |
|
|
|
rpc_srv_endBLOBServer(srv); |
rpc_srv_endServer(srv); |
rpc_srv_endServer(srv); |
return 0; |
return 0; |
} |
} |