In order to carry on a two-way conversation, a TP must be
able to inform its partner that it is finished sending data and
is ready to receive. It also must wait for data sent by its partner
and receive the data when it arrives. The two-way conversation illustrated
in Figure 3-6 “Using MCPrepToRcv and MCRcvAndWait” uses the MCPrepToRcv and MCRcvAndWait intrinsics as well as the intrinsics already introduced.
MCPrepToRcv |
 |
The local TP uses the MCPrepToRcv intrinsic to relinquish control of the conversation
and give the remote TP permission to send data. It replaces "person
relinquishes control of conversation."
MCRcvAndWait |
 |
The MCRcvAndWait intrinsic waits for data from the remote TP and receives
data when it arrives. The WhatReceived parameter of the MCRcvAndWait intrinsic tells the local TP what it has received:
control information or data. A TP cannot receive both control information
and data in the same call to MCRcvAndWait; it must issue a separate call to MCRcvAndWait for each one.
The two calls to MCRcvAndWait in Figure 3-6 “Using MCPrepToRcv and MCRcvAndWait” perform different functions:
The first call receives the data being sent, and the second call receives
notification that the remote TP is ready to receive data.
Figure 3-6 Using MCPrepToRcv and MCRcvAndWait