Description
It doesn't appear to be used for anything. Is it necessary?
Since the transfer really only handles the data, it just tracks how many have been transferred. Since it doesn't reconstruct the data into files, there is no concern of which chunk it is, only which file is being transferred.
Perhaps it would be useful to know which chunk(s) were lost if there is an error, so that he remaining chunks could be sent? The server asks for one chunk at a time, so they will almost certainly be sent in order, but if one or two get lost along the way, it would be good to know which have not been sent?
Perhaps the sever could ask for a chunk and if it doesn't receive it after a reasonable time, it can ask for it again with a max 3 attempts per chunk. After three failed attempts, send a connection error and set a timeout to expire the transfer. The user may ask the server to retry the transfer once they are on a reliable network and things can pick up where they left off...?