Back to home page

Enduro/X

 
 

    


0001 TPCONNECT(3)
0002 ============
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 tpconnect - Connect to conversational service
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 #include <atmi.h>
0014 
0015 int tpconnect(char *svc, char *data, long len, long flags);
0016 
0017 
0018 For XATMI client link with '-latmiclt -latmi -lubf -lnstd -lpthread -lrt -lm'
0019 
0020 For XATMI server link with '-latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm'
0021 
0022 DESCRIPTION
0023 -----------
0024 Connect to conversational service. This is first step to enter in two way 
0025 streamed communications between caller client and server. The service is given 
0026 in 'svc' parameter. Destination service must be programmed that way, that it 
0027 supports conversations. 'data' is optional data buffer that must be allocated 
0028 by *tpcalloc()*, and the 'len' parameter is used only in case if 'data' is not 
0029 NULL and buffer is not self describing the length, i.e. *CARRAY*.
0030 
0031 *Valid flags*
0032 
0033 *TPNOTRAN* Do not call service in transaction mode. This is effective in case 
0034 if caller process is running in transaction mode, but destination process 
0035 shall not run in the same global transaction.
0036 
0037 *TPSIGRSTRT* Restart the system call in progress if interrupted by signal 
0038 handler. This affects only underlying mq_* function calls.
0039 
0040 *TPNOTIME* Ignore timeout setting (*NDRX_TOUT* env variable). Wait for reply 
0041 for infinitely. Global transaction time-out still applies.
0042 
0043 *TPSENDONLY* At the call point, caller want's to enter in send only mode.
0044 
0045 *TPRECVONLY*  At the call point, caller want's to ender in receive only mode.
0046 
0047 *TPSENDONLY* and *TPRECVONLY* are each other exclusive and cannot be combined.
0048 
0049 RETURN VALUE
0050 ------------
0051 On success, *tpconnect()* return connection descriptor (>=0); on error, -1 is 
0052 returned, with *tperrno* set to indicate the error.
0053 
0054 
0055 ERRORS
0056 ------
0057 Note that *tpstrerror()* returns generic error message plus custom message 
0058 with debug info from last function call.
0059 
0060 *TPEINVAL* Invalid parameter is given to function. Either service name is NULL 
0061 or 'data' is not NULL, but not allocated by *tpalloc()*
0062 
0063 *TPENOENT* No service ('svc' parameter) advertised in system.
0064 
0065 *TPELIMIT* Max number of connections are reached. Currently max number of
0066 connections is limited to 10 (*MAX_CONNECTIONS* macro).
0067 
0068 *TPETIME* Service did not reply in given time ('NDRX_TOUT'). 
0069 
0070 *TPESVCERR* System level service failure. Server died during the message 
0071 presence in service queue.
0072 
0073 *TPESYSTEM* System failure occurred during serving. See logs i.e. user log, 
0074 or debugs for more info. DDR route not found or failed.
0075 
0076 *TPEOS* System failure occurred during serving. See logs i.e. user log, 
0077 or debugs for more info.
0078 
0079 *TPETRAN* Called service is configured as auto-tran, but internal *tpbegin(3)*
0080 at XATMI server code failed. Or server failed to join global transaction. See
0081 reasons in log file.
0082 
0083 *TPEITYPE* There was problem with XATMI data type buffer, not supported by service
0084 or corrupted.
0085 
0086 EXAMPLE
0087 -------
0088 See *atmitest/test003_basicconvers/atmiclt3.c* for sample code.
0089 
0090 BUGS
0091 ----
0092 Report bugs to support@mavimax.com
0093 
0094 SEE ALSO
0095 --------
0096 *tpsend(3)* *tprecv(3)* *tpdiscon(3)*
0097 
0098 COPYING
0099 -------
0100 (C) Mavimax, Ltd
0101