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

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

4.8.4 tpdiscon - Disconnect connection with interactive service

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

(1) Form

TP1/Client/W or TP1/Client/P

 
#include <dcvxatmi.h>
int tpdiscon (DCLONG cd)
 

(2) Purpose

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.

(3) Argument set by UAPs

(4) Return values

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.

(5) Notes