HP-UX SNAplus2 R7 APPC Programmer's Guide
APPC Conversation Verbs
MC_RECEIVE_AND_WAIT and RECEIVE_AND_WAIT
• GET_TYPE
• [MC_]GET_ATTRIBUTES
• [MC_]TEST_RTS
• Prematurely cancel the [MC_]RECEIVE_AND_POST verb by issuing one of the following verbs:
• DEALLOCATE with dealloc_type set to AP_ABEND_PROG, AP_ABEND_SVC,orAP_ABEND_TIMER
• MC_DEALLOCATE with dealloc_type set to AP_ABEND
• SEND_ERROR
• TP_ENDED
3. Checks that the callback routine (supplied as a parameter on this verb) has been called by APPC. When the TP
finishes receiving data asynchronously, APPC calls this routine.
4. Checks the new value of the primary return code primary_rc.
If the primary return code is
AP_OK, the local TP can examine the other returned parameters and manipulate the
asynchronously received data.
If the primary return code is not
AP_OK, only the secondary_rc and rts_rcvd (request-to-send received) parameters
are meaningful.
Avoiding Indefinite Waits
UNIX
If the local TP issues the [MC_]RECEIVE_AND_POST verb and subsequently waits for the callback routine to
be called, it will be suspended until information is received from the partner TP. It could wait indefinitely if the
partner TP does not send any information, or does not issue a verb causing the partner LU to flush its send
buffer. If you need to have the TP operating continuously, avoid waiting on the callback routine, or use the
[MC_]RECEIVE_IMMEDIATE verb.
4.11 MC_RECEIVE_AND_WAIT and RECEIVE_AND_WAIT
The MC_RECEIVE_AND_WAIT or RECEIVE_AND_WAIT verb receives any data that is currently available from
the partner TP. If no data is currently available, the local TP waits for data to arrive.
While an asynchronous [MC_]RECEIVE_AND_WAIT is outstanding, the application can issue the following verbs
on the same conversation:
• GET_TYPE
• [MC_]DEALLOCATE with a deallocate type of AP_ABEND, AP_ABEND_PROG, AP_ABEND_SVC,or
AP_ABEND_TIMER
• [MC_]GET_ATTRIBUTES
• Additional [MC_]RECEIVE verbs, provided that they are issued in non-blocking mode
• [MC_]RECEIVE_EXPEDITED_DATA
• [MC_]REQUEST_TO_SEND
• [MC_]SEND_DATA (full-duplex conversations only)
• [MC_]SEND_EXPEDITED_DATA
173