Implementation of TCP sliding window