version 1.3.2.1, 2011/08/19 09:20:47
|
version 1.3.2.2, 2011/08/19 12:51:50
|
Line 49 SUCH DAMAGE.
|
Line 49 SUCH DAMAGE.
|
/* |
/* |
* rpc_cli_openBLOBClient() Connect to BLOB Server |
* rpc_cli_openBLOBClient() Connect to BLOB Server |
* @rpccli = RPC Client session |
* @rpccli = RPC Client session |
* @sockType = Socket type, like SOCK_STREAM, SOCK_DGRAM or SOCK_RAW |
|
* @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 connection to BLOB server established |
* return: NULL == error or !=NULL connection to BLOB server established |
*/ |
*/ |
rpc_cli_t * |
rpc_cli_t * |
rpc_cli_openBLOBClient(rpc_cli_t * __restrict rpccli, int sockType, u_short Port) | rpc_cli_openBLOBClient(rpc_cli_t * __restrict rpccli, u_short Port) |
{ |
{ |
rpc_cli_t *cli = NULL; |
rpc_cli_t *cli = NULL; |
struct sockaddr sa; |
struct sockaddr sa; |
Line 95 rpc_cli_openBLOBClient(rpc_cli_t * __restrict rpccli,
|
Line 94 rpc_cli_openBLOBClient(rpc_cli_t * __restrict rpccli,
|
} |
} |
|
|
/* connect to BLOB server */ |
/* connect to BLOB server */ |
cli->cli_type = sockType ? sockType : SOCK_STREAM; | cli->cli_sock = socket(cli->cli_sa.sa_family, SOCK_STREAM, 0); |
cli->cli_sock = socket(cli->cli_sa.sa_family, cli->cli_type, 0); | |
if (cli->cli_sock == -1) { |
if (cli->cli_sock == -1) { |
LOGERR; |
LOGERR; |
free(cli); |
free(cli); |
Line 137 rpc_cli_closeBLOBClient(rpc_cli_t * __restrict cli)
|
Line 135 rpc_cli_closeBLOBClient(rpc_cli_t * __restrict cli)
|
* rpc_cli_openClient() Connect to RPC Server |
* rpc_cli_openClient() Connect to RPC Server |
* @ProgID = ProgramID for RPC session request |
* @ProgID = ProgramID for RPC session request |
* @ProcID = ProcessID for RPC session request |
* @ProcID = ProcessID for RPC session request |
* @sockType = Socket type, like SOCK_STREAM, SOCK_DGRAM or SOCK_RAW |
|
* @family = Family socket type, AF_INET or AF_INET6 |
* @family = Family socket type, AF_INET or AF_INET6 |
* @csHost = Host name or IP address for bind server |
* @csHost = Host name or IP address for bind server |
* @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 connection to RPC server established |
* return: NULL == error or !=NULL connection to RPC server established |
*/ |
*/ |
rpc_cli_t * |
rpc_cli_t * |
rpc_cli_openClient(u_int ProgID, u_int ProcID, int sockType, u_short family, const char *csHost, u_short Port) | rpc_cli_openClient(u_int ProgID, u_int ProcID, u_short family, const char *csHost, u_short Port) |
{ |
{ |
rpc_cli_t *cli = NULL; |
rpc_cli_t *cli = NULL; |
struct hostent *host = NULL; |
struct hostent *host = NULL; |
Line 221 rpc_cli_openClient(u_int ProgID, u_int ProcID, int soc
|
Line 218 rpc_cli_openClient(u_int ProgID, u_int ProcID, int soc
|
} |
} |
|
|
/* connect to RPC server */ |
/* connect to RPC server */ |
cli->cli_type = sockType ? sockType : SOCK_STREAM; | cli->cli_sock = socket(family, SOCK_STREAM, 0); |
cli->cli_sock = socket(family, cli->cli_type, 0); | |
if (cli->cli_sock == -1) { |
if (cli->cli_sock == -1) { |
LOGERR; |
LOGERR; |
free(cli->cli_parent); |
free(cli->cli_parent); |