![]() |
![]() |
|
|
Establishing a Connection
The tpconnect(3c) function sets up a conversation:
Use the following signature to call the tpconnect() function.
int
tpconnect(char *name, char *data, long len, long flags)
The following table describes the arguments to the tpconnect() function.
tpconnect( ) Function Arguments
The BEA Tuxedo system returns a connection descriptor (cd) when a connection is established with tpconnect(). The cd is used to identify subsequent message transmissions with a particular conversation. A client or conversational service can participate in more than one conversation simultaneously. The maximum number of simultaneous conversations is 64. In the event of a failure, the tpconnect() function returns a value of -1 and sets tperrno to the appropriate error condition. For a list of possible error codes, refer to tpconnect(3c) in the BEA Tuxedo ATMI C Function Reference. The following example shows how to use the tpconnect() function. Establishing a Conversational Connection#include atmi.h
#define FAIL -1
int cd1; /* Connection Descriptor */
main()
{
if ((cd = tpconnect("AUDITC",NULL,0,TPSENDONLY)) == -1) {
error routine
}
}
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|