Alternating Bit Protocol ======================== Protocol description : A protocol for managing the re-transmission of lost messages. Consider a sender and a receiver , and assume that the channel from the sender to the receiver is initially empty. The alternating bit protocol works as follows: 1. Each data message sent by Sender contains a protocol bit , 0 or 1. 2. When Sender sends a message , it send it repeatedly (with its corresponding bit) until receiving an acknowledgment (ACK) from Receiver that contains the same protocol bit as the message being sent. 3. When Receiver receives a message , it sends an ACK to Sender and includes the protocol bit of the message received. The first time the message is received , the protocol delivers the message for processing. Subsequent messages with the same bit are simply acknowledged. 4. When Sender receives ACK containing the same bit as the mesage it is currently transmitting , it stops transmitting that message , flips the protocol bit , and repeats the protocol for the next message.