Inbound messages
When the driver is in the RECEIVE
state, the remote
application can send data at any time. As the driver receives data packets, it appends them
to a message object.
The driver recognizes these flags:
SEND_RECEIVED
The sender grants control to the driver; the driver moves into the
SEND
state.CONFIRM_RECEIVED
The driver responds with
CONFIRMED
.CONFIRM_SEND_RECEIVED
SEND_RECEIVED
andCONFIRM_RECEIVED
NORMAL_DEALLOCATE_RECEIVED
Deallocates the conversation per peer’s request.
CONFIRM_DEALLOCATE_RECEIVED
CONFIRM_RECEIVED
andNORMAL_DEALLOCATE_RECEIVED
CONFIRM
flags
display only when you use Sync Confirm. SNA control flags, attached to a packet, identify the packet as the last in a chain. In this case, the driver passes the message into the engine for processing.
Each packet may also have other SNA control flags attached to it. If the
packet contains a DEALLOCATE
flag, then the driver stops
reading; otherwise, it collects the flag and acts on it after the message read is complete.
If the control flag is set, then the driver includes a description of the
connection state in the message’s DRIVERCTL
string.
The driver creates a keyed list with these keys:
DRIVER
appcIdentifies the driver
STATE
send or receiveDriver state after reading the message
CONTROL
confirm, dealloc, sendControl flags received with the message
Some examples are:
- Data arrived with
CONFIRM_SEND_RECEIVED
:{DRIVER appc} {STATE send} {CONTROL {confirm send}}
- Data arrived with
CONFIRM_RECEIVED
:{DRIVER appc} {STATE receive} {CONTROL {confirm}}
- Data arrived with
NORMAL_DEALLOCATE_RECEIVED
:{DRIVER appc} {STATE receive} {CONTROL {dealloc}}
Unless the peer gives control of the conversation to the driver and moves
it into the SEND
state, the driver remains in the RECEIVE
state.
If a read error happens when receiving message data, then the driver
deallocates the conversation. Then, it closes the connection, discards the unfinished data,
and enters the ERROR
state.