By default, the request-reply interface throws an exception if your code does not stream in the full request from TRequestReceiverStream before streaming the reply out to the TRequestReceiverStream. If you do not want to stream in the full request, call TRequestReceiverStream::FlushRequest before beginning to stream out the reply.This sequence of operations must always be performed sequentially. TRequestReceiverSTream is not multithread-safe.
This example shows a simple loop that receives requests, processes them, and replies to the client.
while (TRUE)
{
myReceiver.Receive () ;
theRequest <<= myReceiver ;
// do the processing or call a function that does it
theReply =>> myReceiver ;
myReceiver.Reply () ;
};