OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P
(a) _s version of the function
#include <dcvclt.h>
DCLONG dc_clt_disconnect_s(DCCLT_ID cltid, DCLONG flags)
(b) Non-_s version of the function
#include <dcvclt.h>
DCLONG dc_clt_disconnect(DCLONG flags)
(2) Purpose
Releases permanent connection with a CUP execution process, a RAP-processing server or DCCM3 logical terminal.
(3) Arguments set by UAPs
- cltid
Specify the client ID received by the dc_clt_cltin_s function.
- flags
Set DCNOFLAGS.
(4) Return values
Return Value |
Value (decimal) |
Meaning |
DC_OK |
0 |
Normal termination. Alternatively, for TP1/Client/P, the permanent connection is already disconnected. |
DCCLTER_INVALID_ARGS |
-2501 |
Invalid argument |
DCCLTER_PROTO |
-2502 |
The dc_rpc_open_s function is not issued. |
DCCLTER_NO_BUFS |
-2504 |
A necessary amount of buffer could not be allocated. |
DCCLTER_NET_DOWN |
-2506 |
Communication error. Alternatively, for TP1/Client/P, the permanent connection is already disconnected. |
DCCLTER_TIMED_OUT |
-2507 |
A timeout error occurred during release of permanent connection. |
DCCLTER_SYSERR |
-2518 |
System error. |
DCCLTER_INVALID_CLTID |
-2544 |
The client ID specified in cltid differs from the client ID received by the dc_clt_cltin_s function. |
- The permanent connection is not released when the dc_clt_disconnect_s function returns an error with one the following return values:
- DCCLTER_INVALID_ARGS
- DCCLTER_PROTO
- DCCLTER_NO_BUFS (when the error is detected on the client)
- DCCLTER_INVALID_CLTID
- TP1/Client forcibly releases the permanent connection if the dc_clt_disconnect_s function returns an error with one of the following return values:
- DCCLTER_NO_BUFS (when the error is detected on the server)
- DCCLTER_NET_DOWN
- DCCLTER_TIMED_OUT
- DCCLTER_SYSERR
In this case, the CUP execution process or DCCM3 logical terminal may keep on waiting for a response from the CUP, without detecting the release of permanent connection by TP1/Client. To prevent an infinite wait, specify an appropriate value for the maximum time interval for the permanent connection. For a DCCM3 logical terminal, specify an appropriate value for the time during which the system is unable to determine whether a connection with the terminal is valid.
- Issuing the dc_clt_disconnect_s function in a transaction commits the transaction.
All Rights Reserved. Copyright (C) 2006, 2009, Hitachi, Ltd.