--- libaitrpc/example/tsrv.c 2010/07/08 12:29:38 1.1.1.1.2.8 +++ libaitrpc/example/tsrv.c 2011/08/18 22:24:07 1.2.4.2 @@ -1,4 +1,5 @@ #include +#include #include @@ -81,16 +82,18 @@ 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, SOCK_STREAM, AF_INET, "0.0.0.0", 11111); if (!srv) { printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); 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()); return 1; } + */ /* dump register functions for (f = srv->srv_funcs; f; f = f->func_next) @@ -107,10 +110,11 @@ int main() rpc_srv_unregisterCall(srv, NULL, "dummy"); - pthread_create(&tid[1], NULL, rpc_srv_execBLOBServer, srv); + pthread_create(&tid[1], NULL, (void*(*)(void*)) rpc_srv_execBLOBServer, srv); rpc_srv_execServer(srv); } +// rpc_srv_endBLOBServer(srv); rpc_srv_endServer(srv); return 0; }