A file transfer using stop-and-wait ARQ scheme, with a switch between sender and receiver