refactor tftp to support windowsize