version 1.9.2.23, 2012/05/17 15:14:16
|
version 1.9.2.25, 2012/05/17 15:48:45
|
Line 602 rpc_srv_endBLOBServer(rpc_srv_t * __restrict srv)
|
Line 602 rpc_srv_endBLOBServer(rpc_srv_t * __restrict srv)
|
if (!srv) |
if (!srv) |
return; |
return; |
|
|
if (srv->srv_blob.tid) { |
|
pthread_cancel(srv->srv_blob.tid); |
|
pthread_join(srv->srv_blob.tid, NULL); |
|
} |
|
|
|
/* close all clients connections & server socket */ |
/* close all clients connections & server socket */ |
for (i = 0; i < io_arraySize(srv->srv_blob.clients); i++) { |
for (i = 0; i < io_arraySize(srv->srv_blob.clients); i++) { |
c = io_array(srv->srv_blob.clients, i, rpc_cli_t*); |
c = io_array(srv->srv_blob.clients, i, rpc_cli_t*); |
Line 621 rpc_srv_endBLOBServer(rpc_srv_t * __restrict srv)
|
Line 616 rpc_srv_endBLOBServer(rpc_srv_t * __restrict srv)
|
} |
} |
io_arrayDestroy(&srv->srv_blob.clients); |
io_arrayDestroy(&srv->srv_blob.clients); |
|
|
|
srv->srv_blob.kill = 1; |
|
if (srv->srv_blob.tid) |
|
pthread_cancel(srv->srv_blob.tid); |
|
|
close(srv->srv_blob.server.cli_sock); |
close(srv->srv_blob.server.cli_sock); |
|
|
/* detach blobs */ |
/* detach blobs */ |
Line 675 rpc_srv_loopBLOBServer(rpc_srv_t * __restrict srv)
|
Line 674 rpc_srv_loopBLOBServer(rpc_srv_t * __restrict srv)
|
* @regProgID = ProgramID for authentication & recognition |
* @regProgID = ProgramID for authentication & recognition |
* @regProcID = ProcessID for authentication & recognition |
* @regProcID = ProcessID for authentication & recognition |
* @concurentClients = Concurent clients at same time to this server |
* @concurentClients = Concurent clients at same time to this server |
* @netBuf = Network buffer length, if =0 == BUFSIZ (also meaning max RPC packet) | * @netBuf = Network buffer length (min:512 bytes), if =0 == BUFSIZ (also meaning max RPC packet) |
* @csHost = Host name or address for bind server, if NULL any address |
* @csHost = Host name or address for bind server, if NULL any address |
* @Port = Port for bind server, if Port == 0 default port is selected |
* @Port = Port for bind server, if Port == 0 default port is selected |
* return: NULL == error or !=NULL bind and created RPC server instance |
* return: NULL == error or !=NULL bind and created RPC server instance |
Line 696 rpc_srv_initServer(u_int regProgID, u_char regProcID,
|
Line 695 rpc_srv_initServer(u_int regProgID, u_char regProcID,
|
return NULL; |
return NULL; |
if (!Port) |
if (!Port) |
Port = RPC_DEFPORT; |
Port = RPC_DEFPORT; |
if (!netBuf) | if (netBuf < RPC_MIN_BUFSIZ) |
netBuf = BUFSIZ; |
netBuf = BUFSIZ; |
else |
else |
netBuf = io_align(netBuf, 1); /* align netBuf length */ |
netBuf = io_align(netBuf, 1); /* align netBuf length */ |