HPlogo LU 6.2 API Application Programmer's Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 6 Buffer Management

Send Buffer

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

For each conversation allocated, LU 6.2 API establishes a send buffer. On MPE V, the send buffer is always 2044 bytes. On MPE XL, the send buffer is the same size as the maximum RU size for the session. The maximum RU size is a configured value from 256 through 2048 associated with the session type. For more information on configuring RU sizes, see the APPC Subsystem on MPE XL Node Manager's Guide.

Whenever the MCSendData intrinsic is called, data is transferred to the send buffer from the Data parameter specified in the intrinsic call. When the send buffer is full, LU 6.2 API flushes the buffer and transmits the data to the remote TP. No data is transmitted until the send buffer is full or until an intrinsic is called that flushes the buffer.

Example 1: Sending Small Data Records

Figure 6-1 “Send and Receive Buffers” shows how data flows from the send buffer of the local TP to the receive buffer of the remote TP in a one-way file transfer application. This example application sends 16-byte data records. The send buffer in this example holds 2044 bytes.

Figure 6-1 Send and Receive Buffers

Send and Receive Buffers

Because each data record in figure 6-1 is only 16 bytes long, LU 6.2 API can store 127 data records in the 2044-byte send buffer (127 records of 16 bytes = 2032 bytes). When MCSendData is called for the 128th time, 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 Local TP Receives an Allocation Error”, 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

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.

Feedback to webmaster