Rtr C Programming Interface - Compaq Reliable Transaction Router Getting Started

Reliable transaction router
Hide thumbs Also See for Reliable Transaction Router:
Table of Contents

Advertisement

Example of object creation in an RTR server program.
Sample C++
server code
void CombinationOrderProcessor::StartProcessingOrdersAtoL()
{
//
// Create an RTRKeySegment for all ASCII values between "A" and "L."
//
m_pkeyRange = new RTRKeySegment (rtr_keyseg_string, //To process strings.
StartProcessingOrders(PARTITION_NAMEAToL,m_pKeyRange);
}
//
// Create an RTRData Oobject to hold each incoming message or event. This
// object will be reused.
//
RTRData *pDataReceived= new RTRData();
//
// Continually loop, receiving messages and dispatching them to the handlers.
//
while(true)
{
sStatus = pTransaction->Receive(&pDataReceived);
ASSERT(RTR_STS_OK == sStatus);
sStatus = pDataReceived->Dispatch();
ASSERT(RTR_STS_OK == sStatus);
}
You can use the C programming interface to write C applications
RTR C
that use RTR. For more information on the C programming
Programming
interface, see the RTR C Application Programmer's Reference
Interface
Manual and the RTR Application Design Guide.
Snippets from client and server programs using the RTR C-
programing API follow and are more fully shown in the RTR
Application Design Guide.
Application Programming Interfaces
1,
//Length of the key.
OffsetIntoApplicationProtocol, //Offset value.
"A",
//Lowest ASCII value for partition.
"L");
//Highest ASCII value for partition.
RTR Interfaces 4–9

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rtr

Table of Contents