Microsoft KB Archive/22447

Description of XON/XOFF Protocol

PSS ID Number: Q22447 Article last modified on 11-02-1994

1.x 2.x 3.x 4.00 5.00

MS-DOS

= SUMMARY =

The following article gives information about XON/XOFF and its process.

= MORE INFORMATION =

XON/XOFF is a serial-communication, software-handshaking protocol for controlling the flow of data from the transmitter (for example, the computer) to the receiver (for example, the printer). This control is necessary to ensure that the transmitter sends data only when the receiver can process the data.

In XON/XOFF, the following process occurs:


 * 1) The transmitter sends a continuous stream of data. When the receiver’s buffer begins to get full, or if the receiver goes into an error state, the receiver sends an XOFF character (ASCII decimal 19, also known as DC3) to the transmitter to tell it to stop sending data.
 * 2) The transmitter stops sending data.
 * 3) When the receiver has processed enough of the data so that its buffer has room for more data, and the receiver is not in an error state, the receiver sends an XON character (ASCII decimal 17, also known as DC1) to tell the transmitter that it can begin sending data again.
 * 4) The transmitter then sends data again until it receives another XOFF from the receiver, and so on.

Because it is the receiver that notifies the transmitter when the receiver is/is not ready for data, the receiver is in control of this type of protocol.

KBCategory: kbother KBSubcategory: Additional reference words:

=
================================================================ Copyright Microsoft Corporation 1994.