Sliding window protocol working principle and types