OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P

[Contents][Index][Back][Next]

4.4.3 dc_clt_set_raphost_s - Set the destination of a request to establish a permanent connection

Organization of this subsection
(1) Form
(2) Purpose
(3) Arguments set by UAPs
(4) Return values
(5) Notes

(1) Form

(a) TP1/Client/W
_s version of the function
 
#include <dcvclt.h>
DCLONG dc_clt_set_raphost_s(DCCLT_ID cltid,
                            char *raphost,
                            DCLONG flags)
 
Non-_s version of the function
 
#include <dcvclt.h>
DCLONG dc_clt_set_raphost(char *raphost, DCLONG flags)
 
(b) TP1/Client/P
_s version of the function
 
#include <dcvclt.h>
DCLONG dc_clt_set_raphost_s(DCCLT_ID cltid,
                            char CLTFAR *raphost,
                            DCLONG flags)
 
Non-_s version of the function
 
#include <dcvclt.h>
DCLONG dc_clt_set_raphost(char CLTFAR *raphost, DCLONG flags)
 

(2) Purpose

The dc_clt_set_raphost_s function sets the host name and port number of the node to which you want to send a request to establish a permanent connection. The host name and port number set by these functions prevail over those specified in DCCLTRAPHOST in the client environment definition. After the dc_clt_set_raphost_s function is executed, the dc_clt_connect_s function uses the host name and port number specified in the dc_clt_set_raphost_s function.

You may want to restore the host name and port number that were used before the dc_clt_set_raphost_s function was executed. To do this, before executing the dc_clt_set_raphost_s function to set a new host name and port number, execute the dc_clt_get_raphost_s function to acquire the current host name and port number. Then, after executing the dc_clt_set_raphost_s function to set a new host name and port number, reexecute the function specifying the previously acquired host name and port number.

(3) Arguments set by UAPs

(4) Return values

Return value Value (decimal) Meaning
DC_OK 0 The function normally terminated.
DCCLTER_INVALID_ARGS -2501 The value specified in an argument is incorrect.
DCCLTER_PROTO -2502 The function has already been issued in the transaction or is now establishing a permanent connection. Alternatively, the dc_rpc_open_s function has not been issued.
DCCLTER_NO_BUFS -2504 A necessary amount of buffer could not be allocated.
DCCLTER_INVALID_CLTID -2544 The client ID specified in cltid differs from the client ID acquired by the dc_clt_cltin_s function.

(5) Notes