Envoy Application Programming Manual

Table Of Contents
BISYNC Point-To-Point Protocol
Envoy Application Programming Manual427159-001
3-26
WRITEREAD Procedure (Limited Conversational
Exchange)
READ. If only an acknowledgment is received, the count read parameter is returned
with a value of two (includes the MCW) and the line state is WRITE.
The file-system errors for an initial WRITEREAD are the same as those for an initial
WRITE.
Continuation WRITEREAD (Line in WRITE State)
A WRITEREAD while the line is in the WRITE state is a continuation WRITEREAD.
A continuation WRITEREAD (Example 3-9) causes Envoy, on behalf of the application
process, to send the message in the buffer of the application process to the remote
station. The call to the WRITEREAD procedure then completes when the remote station
either returns a reply message (which is returned to the application process’s buffer) or
acknowledges the message with a normal ACK0 or ACK1.
The successful transmission of a continuation message is indicated by a condition code
of CCE upon completion of the WRITEREAD. If the remote station returns a reply
message, the count read parameter at completion is returned as a value greater than zero
and the line state is READ. If the remote station returns an acknowledgment only, the
count read parameter is returned with a value of two and the line state is WRITE.
Example 3-8. Initial WRITEREAD (Line in CONTROL State)
Local Remote
line state = CONTROL
CALL WRITEREAD(...)
| (bid) ENQ -->
| <-- ACK0
| message 1 -->
| <-- ACK1 or message 1
|
(WRITEREAD completes)
error = 0
line state = WRITE
if ACK1 received
or
line state = READ
if message received