Simulation of a sliding window protocol