Envoy Application Programming Manual

Table Of Contents
Software Concepts
Envoy Application Programming Manual427159-001
2-7
Message Transmission
To read a message, the application process receives the message through a call to the
READ procedure. Envoy acknowledges each message when the application process
issues a subsequent call to READ; the subsequent call then waits for the next message.
By delaying the acknowledgment of a message until the next call to READ, the
application process is allowed to process the message and, if necessary, return an error
indication (such as an EOT error) to the sender. In this manner, the sender can take
corrective action for the current message.
To write a message, the application process sends the message through a call to the
WRITE procedure. The application process then waits for Envoy to send an
acknowledgment from the remote station. The WRITE call does not complete until the
acknowledgment is received. This interval allows the sender to receive either a positive
acknowledgment or an error indication (such as an EOT error) for its current message.
Example 2-2
shows a basic read-write operation involving two Compaq computers.
Example 2-1. Transmission
CALL READ <--- message 1 \
CALL READ <--- message 2 |
. |
. |--> transmission
. |
CALL READ <--- message n |
CALL READ <--- EOT /
Example 2-2. Basic READ-WRITE Operation
Receiver Sender
CALL READ
|
| CALL WRITE
(READ completes) <--- message 1 |
|
(message 1 is processed) |
|
CALL READ |
| ACK0 ---> (WRITE completes)
|
| (sender prepares
| the next message)
|
| CALL WRITE
(READ completes) <--- message 2 |
|
(message 2 is processed) |
|
CALL READ |
| ACK1 ---> (WRITE completes)
|
(READ completes)