tpsend − Send message to open conversation
#include <atmi.h>
int tpsend(int cd, char *data, long len, long flags, long *revent);
For XATMI client link with −latmiclt −latmi −lubf −lnstd −lpthread −lrt −lm
For XATMI server link with −latmisrv|−latmisrvnomain|−latmisrvinteg −latmi −lubf −lnstd −lpthread −lrt −lm
Send a message to open conversation, described by cd, which is opened by tpconnect(). The outgoing buffer data must be allocated with tpalloc(), if buffer is not self describing .e.g CARRAY, then len parameter must be correctly set. The data can be also set to NULL in that case len is not used.
Enduro/X does not terminate global transaction in case of send failure.
Valid flags
TPRECVONLY Signal the caller that we want to enter in listening mode. The other end will receive TPEV_SENDONLY event.
TPNOBLOCK Do not block the call if conversational queue is full.
TPSIGRSTRT Restart the system call in progress if interrupted by signal handler. This affects only underlaying mq_* function calls.
TPNOBLOCK Do not block on empty queue, if not messages present, the function returns immediately.
On success, tpcall() return zero; on error, −1 is returned, with tperrno set to indicate the error.
revent return values TPEV_DISCONIMM Conversation have been terminated by tpdiscon()
TPEV_SVCERR Server died and queue was removed or server did tpreturn() with TPSUCCESS.
TPEV_SVCFAIL Server returned TPFAIL with tpreturn()
Note that tpstrerror() returns generic error message plus custom message with debug info from last function call.
TPEINVAL Invalid call descriptor cd passed in or data pointer is not pointing to buffer allocated by tpalloc().
TPETIME Was unable to send message in given time(NDRX_TOUT env param.).
TPEEVENT Event received and it is installed into revent field.
TPESYSTEM System failure occurred during serving. See logs i.e. user log, or debugs for more info.
TPEOS System failure occurred during serving. See logs i.e. user log, or debugs for more info.
See atmitest/test003_basicconvers/atmisv3.c for sample code.
Report bugs to support@mavimax.com
tpconnect(3) tprecv(3) tpdiscon(3) tpreturn(3)
© Mavimax, Ltd