--- libaitrpc/example/tsrv.c 2011/05/02 23:12:07 1.2 +++ libaitrpc/example/tsrv.c 2011/08/29 22:37:06 1.3 @@ -3,6 +3,7 @@ #include + int aaa(rpc_func_t *f, int in, rpc_val_t *iv) { rpc_blob_t *b; @@ -49,8 +50,8 @@ 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_declValsCall(f, 4); - rpc_srv_getValsCall(f, &v); + rpc_srv_allocVars(f, 4); + rpc_srv_getVars(f, &v); RPC_SET_BUF(&v[0], "00!oo", 6); RPC_SET_I8(&v[1], 65); RPC_SET_STR(&v[2], "Oho boho i cheburashka"); @@ -82,7 +83,8 @@ int main() pthread_t tid[2]; int ret; - srv = rpc_srv_initServer(100, 2, 1, 2, "0.0.0.0", 11111); + srv = rpc_srv_initServer(100, 2, 1, AF_INET, "0.0.0.0", 11111); +// srv = rpc_srv_initServer(100, 2, 1, AF_LOCAL, "0.0.0.0", 11111); if (!srv) { printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); return 1; @@ -112,6 +114,7 @@ int main() rpc_srv_execServer(srv); } + rpc_srv_endBLOBServer(srv); rpc_srv_endServer(srv); return 0; }