Outbound messages

When writing a message, the driver sets the control flags according to the default configuration values.

The Control flag is used through the Control Messages option. The driver examines the message’s DRIVERCTL string for an APPC key. That is, there might be control strings for multiple drivers.

If the driver finds one, then it parses the string as a keyed list with boolean values and recognizes these keys:

  • CONFIRM
  • DEALLOCATE
  • FLUSH
  • PREPARE_TO_RECEIVE

Some examples are:

  • Request confirmation and put the peer into SEND state:
    {APPC {{CONFIRM 1} {PREPARE_TO_RECEIVE 1}}}
  • Flush the data stream and request a deallocation:
    {APPC {{CONFIRM 0} {DEALLOCATE 1} {FLUSH 1} {PREPARE_TO_RECEIVE 0}}}

If the DRIVERCTL string requests a deallocation, then it is handled after the write; otherwise, the default control flags are handled as follows:

if (Full-Duplex)
         send PREPARE_TO_RECEIVE verb
else if (Deallocate after every write)
         deallocate conversation
else if (Flush after every write)
         send FLUSH verb
endif

The Full-Duplex flag is used through the Full Duplex option. This is set, or the DRIVERCTL string is set, to the PREPARE_TO_RECEIVE key. The driver retains control of the conversation and remains in the SEND state.