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

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

4.8.5 tpsend - Send message to interactive service

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

(1) Form

(a) TP1/Client/W
 
#include <dcvxatmi.h>
int tpsend(DCLONG cd, char *data, DCLONG len,
           DCLONG flags,
           DCLONG *revent)
 
(b) TP1/Client/P
 
#include <dcvxatmi.h>
int tpsend(DCLONG cd, char CLTFAR *data, DCLONG len, 
    DCLONG flags, DCLONG CLTFAR *revent)
 

(2) Purpose

Sends data to the interactive service.

The system with control of connection can issue the tpsend function.

(3) Arguments set by UAPs

(4) Return values

If an error occurs, the tpsend 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
TPEINVAL Invalid argument
TPEBADDESC Invalid descriptor is specified in cd.
TPETIME A timeout error occurred.
  • For the issuer in the transaction mode:
    A transaction timeout error occurred. The transaction is rolled back. In this case, TPETIME is returned to new data transmission or undetermined response until the transaction is rolled back.
  • For the issuer in other than the transaction mode:
    A blocking timeout error occurred where neither TPNOBLOCK nor TPNOTIME is specified.
In either case, the value specified in *data is not changed.
TPEEVENT An event occurred. The return value is returned to revent.
TPEBLOCK Blocking status occurred when the tprecv function was issued with TPNOBLOCK specified.
TPGOTSIG The signal is received, but TPSIGRSTRT is not specified.
TPEPROTO Inappropriate status for issuing the tpsend function.
TPESYSTEM An error occurred in the communication resource manager.
TPEOS An error occurred in the operating system.

(5) Notes