OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P
TP1/Client/W or TP1/Client/P
#include <dcvxatmi.h> int tpdiscon (DCLONG cd)
Disconnects connection with interactive service, and reports the event (TPEV_DISCONIMM) to the interactive service.
Issuing the tpdiscon function immediately disconnects connection. Data that does not reach the destination is discarded. The tpdiscon function can also be used when the interactive service belongs to the transaction of the issuer. In this case, the transaction is rolled back.
The tpdiscon function can be issued from only the originator of the interactive service. This function cannot be issued within the interactive service. The issuer of this function does not need to have a right to control the connection.
The TP1/Client interactive service issues the tpdiscon function that reports the disconnection when either system completes communication.
If an error occurs, the tpdiscon function returns -1 and sets one of the following values in tperrno as a return value to report the information about the error.
Return value | Meaning |
---|---|
TPEBADDESC | The argument is invalid, or is specified as the descriptor of the called interactive service. |
TPETIME | Timeout error occurred. The specified descriptor is invalidated. |
TPEPROTO | Inappropriate status for issuing the tpdiscon function. |
TPESYSTEM | An error occurred in the communication resource manager. |
TPEOS | An error occurred in the operating system. |
All Rights Reserved. Copyright (C) 2006, 2009, Hitachi, Ltd.