Protocols that provide reliability have to include several functions:
- error detection: detect bit errors, packet loss or duplication.
- acknowledgements (ACK): feedback from the receiver to the sender. A cumulative ACK lets the sender know that several sequential packets are received correctly. In contrast a selective ACK acknowledges just one individual packet.
- retransmissions: lost packets are automatically retransmitted from
the sender after a timeout, when no ACK is received.
Very simple protocol where the sender sends one frame and then waits for the ACK before proceeding.
If a timeout occurs the sender resends all packets that have been sent, but not yet been acknowledged.
The sender retransmits only those packets that it suspects were lost.
This individual retransmissions require that the receiver individually acknowledges correctly received packets.
The application shows you the differences between the described methods. Just try!
In duplex communication, an acknowledgement is attached to the outgoing data frames.