Application Programming Interfaces

Figure 4–1 RTR Browser Interface

Sample C++ client Example of object creation in an RTR client program. code

//

//Create a Transaction Controller to receive incoming messages

//and events from a client.

//

RTRClientTransactionController *pTransaction = new RTRClientTransactionController();

//

//Create an RTRData object to hold an ASCII message for the server.

RTRData *pMessage1 = new RTRData("You are pretty easy to use!!!");

//Send the Server a message

//

sStatus = pTransaction->SendApplicationMessage(pMessage1); ASSERT(RTR_STS_OK == sStatus);

//

//Since we have successfully finished our work, tell RTR we accept the

//transaction.

//

pTransaction->AcceptTransaction();

4–8RTR Interfaces

Page 56
Image 56
Compaq Reliable Transaction Router manual Application Programming Interfaces, RTR Browser Interface