LU 6.2 API Application Programmer's Reference Guide (30294-90008)

Chapter 6 131
Buffer Management
Send Buffer
LU 6.2 API checks to see if 16 more bytes will fit in the send buffer.
Only 12 more bytes will fit, so LU 6.2 API transmits the 127 records in
the send buffer and then stores the 128th record in the send buffer.
Example 2: An Allocation Error
In example 2, a local TP receives an allocation error from the remote
TP. After executing the MCAllocate intrinsic, LU 6.2 API does not wait
for a response from the remote TP before it starts executing calls to
MCSendData. If the conversation could not be allocated on the remote
side, the allocation error could be received on any of the calls to
MCSendData. In Figure 6-2, the allocation error does not reach the local
TP until the local TP has made three calls to MCSendData. The TP is
informed of the error through the
Status
parameter in the fourth call
to MCSendData.
Figure 6-2 The Local TP Receives an Allocation Error
To verify that a conversation is allocated successfully, call MCAllocate
with the
SyncLevel
parameter set to 0 (CONFIRM), and then call
MCConfirm. MCConfirm flushes the send buffer and requests that the
remote TP send a reply, confirming that the conversation was allocated
successfully.