HP-UX SNAplus2 CPI-C Programmer's Guide (June 2003)

Concepts
A Simple Mapped Conversation
Chapter 1 39
Allocate, which requests that SNAplus2 establish a conversation
between the invoking program and the invoked program.
The invoked program issues the Accept_Conversation call, which
informs SNAplus2 that the invoked program is ready to begin a
conversation with the invoking program.
Sending Data
The Send_Data call puts one data record (containing application data to
be transmitted) into the local LU's send buffer which already contains
the allocation request. The transmission of the data to the partner
program does not happen until one of the following events occurs:
The send buffer fills up
The program issues a call that forces SNAplus2 to flush the buffer
(and send the data to the partner program)
The Deallocate call flushes the send buffer sending the allocation request
and data to the partner program.
Receiving Data
The Receive call receives the data record and status information from
the partner program. If no data or status information is currently
available, the local program, by default, waits for data to arrive.
The
data_received
parameter of the Receive call tells the program
whether it received data and if so, whether the data is complete or not.
Ending a Conversation
To end a conversation, one of the programs issues the Deallocate call,
which causes SNAplus2 to deallocate the conversation between the two
programs.