Uses sliding window to send a file to a client. C++