Envoy Application Programming Manual

Table Of Contents
Software Concepts
Envoy Application Programming Manual427159-001
2-10
Line States
Line States
At any given time, an open communications line is in the CONTROL state, READ state,
or WRITE state (Figure 2-2).
CONTROL State
The CONTROL state is the initial state of the line following a call to OPEN. The line
reverts to the CONTROL state when a transmission completes (that is, when an EOT is
sent or received).
READ State
The line is in the READ state while a transmission is being received. The READ state is
entered from the CONTROL state or the WRITE state when a call to the READ
procedure is made.
WRITE State
The line is in the WRITE state while a transmission is being sent. The WRITE state is
entered from the CONTROL state when a call to the WRITE procedure is made. The
line states define which operations (that is, which file-system procedure calls) are valid
at any given time.
For example, a point-to-point station is not permitted to bid for the line while a
transmission is in progress. If the receiving station is a Compaq application process, its
line is in the READ state while a transmission is occurring. An attempt by the
application process to bid for the line (that is, to issue a WRITE) while the line is in the
READ state is rejected by Envoy with an error 160 (request is invalid for line state).
Figure 2-2. Line States
011CDT .CDD
CONTROL
STATE
READ
STATE
WRITE
STATE
EOT EOT
READ WRITE
READ
READ WRITE