Application Programming Interfaces

Sample C client code

Sample C server code

Example of an open channel call in an RTR client program:

status = rtr_open_channel(&Channel, Flags, Facility, Recipient, RTR_NO_PEVTNUM, Access, RTR_NO_NUMSEG, RTR_NO_PKEYSEG);

if (Status != RTR_STS_OK)

Example of a receive message call in an RTR server program:

status = rtr_receive_message(&Channel, RTR_NO_FLAGS, RTR_ANYCHAN, MsgBuffer, DataLen,

RTR_NO_TIMOUTMS, &MsgStatusBlock);

if (status != RTR_STS_OK)

A client can have one or multiple channels, and a server can have one or multiple channels. A server can use concurrent servers, each with one channel. How you create your design depends on whether you have a single CPU or a multiple CPU machine, and on your overall design goals and implementation requirements.

4–10RTR Interfaces

Page 58
Image 58
Compaq Reliable Transaction Router manual Example of an open channel call in an RTR client program