SNAX/APC Application Programming Manual

Using the Application Program Interface
SNAX/APC Application Programming Manual138786
1-26
Data Exchanged Using SNAX/APC
How to Respond to a State Transition Request
SNAX/APC notifies the local TP of a request to send by the remote TP in replies to the
(MC)CONFIRM, (MC)RECEIVE-AND-WAIT, (MC)RECEIVE-IMMEDIATE,
(MC)SEND-DATA, or (MC)SEND-ERROR verbs.
When the remote TP requests a transition to Send state (by issuing a (MC)REQUEST-
TO-SEND request), the local TP receives notification in the REQUEST-TO-SEND-IND
field of the (MC)CONFIRM, (MC)RECEIVE-AND-WAIT, (MC)RECEIVE-
IMMEDIATE, (MC)SEND-ERROR, or (MC)SEND-DATA replies.
The local TP should note that the remote TP wants to send data, but the local TP can
continue to send its own data for as long as required. When the local TP is ready to
receive the data from the remote TP, it should issue a (MC)RECEIVE-AND-WAIT or
(MC)PREPARE-TO-RECEIVE request, which places the remote TP in Send state.
Data Exchanged Using SNAX/APC
Data is exchanged using either basic or mapped conversations. In essence the mapped
conversation is easier to use because you do not have to be concerned with General Data
Stream (GDS) headers. The introduction to this section contained information on
mapped verbs; this subsection is relevant only to those who wish to use basic verbs.
Figure 1-8. Verb Flow for Requesting a Change to Send State
008CDT .CDD
Remote TPLocal TP
RECEIVE-AND-WAIT request
RECEIVE-AND-WAIT reply
(WHAT-RECEIVED=DATA)
RECEIVE-AND-WAIT request
SEND-DATA request
REQUEST-TO-SEND request
REQUEST-TO-SEND reply
SEND-DATA reply
(REQUEST-TO-SEND-
INDICATOR)
(make note of the request)
SEND-DATA request
SEND-DATA reply
(RC=OK)
RECEIVE-AND-WAIT request
RECEIVE-AND-WAIT reply
(WHAT-RECEIVED=SEND)
SEND-DATA request