|
|
|
|
When a program sends data to its partner program, it can also request the partner program to confirm that it has received the data successfully. The receiving program must either confirm receipt of the data or indicate that an error has occurred. The two programs are synchronized each time they exchange a confirmation request and response. This is illustrated in Confirmation Processing.
The synchronization level is one of the conversation's characteristics. There are two possible synchronization levels:
The default synchronization level is
Issuing the Confirm call does the following:
It flushes the local LU's send buffer (which sends any data contained in the buffer to the partner program)
It sends a confirmation request, which the partner program receives through the status_received parameter of a Receive call
After issuing the Confirm call, the invoking program waits for confirmation from the invoked program.
The status_received parameter of the Receive call indicates any future action required by the local program.
In the previous example, the first Received call has a status_received of CM_CONFIRM_RECEIVED, indicating that a confirmation is required before the partner program can continue.
The invoked program issues the Confirmed call to confirm receipt of data; this frees the invoking program to resume processing.
Because the synchronization level of the conversation is set to
For the second Receive call, status_received is CM_CONFIRM_DEALLOC_RECEIVED, indicating that the partner program requires a confirmation, generated by the Confirmed call, before the conversation can be deallocated.
|
|
|
|
|