code: public void updateProgress(ProgressInfo newProgress)
      {
          assert peer.equals(newProgress.peer);
  
          Map<String, ProgressInfo> currentFiles = newProgress.direction == ProgressInfo.Direction.IN
                                                      ? receivingFiles : sendingFiles;
          currentFiles.put(newProgress.fileName, newProgress);
      }
docs: Update progress of receiving/sending file.
  
  @param newProgress new progress info