Author Topic: AutoPatcher Features  (Read 4858 times)


  • Not-a-newbie
  • *
  • Posts: 23
  • Karma: 1
    • View Profile
AutoPatcher Features
« on: June 30, 2009, 10:41:24 PM »
Is there any way to get information belows in the autopatcher client
1.current download speed size of the files needed to be downloaded much has been downloaded totally.

Current Autopatcher can only tell information about the current file which is downloading.




  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: AutoPatcher Features
« Reply #1 on: June 30, 2009, 11:24:30 PM »
Yes, in the version in source control you have this information. It will be released officially soon.

Code: [Select]
struct OnFileStruct
/// The index into the set of files, from 0 to numberOfFilesInThisSet
unsigned fileIndex;

/// The name of the file
char fileName[512];

/// The data pointed to by the file
char *fileData;

/// The actual length of this file.
BitSize_t byteLengthOfThisFile;

/// How many bytes of this file has been downloaded
BitSize_t bytesDownloadedForThisFile;

/// Files are transmitted in sets, where more than one set of files can be transmitted at the same time.
/// This is the identifier for the set, which is returned by FileListTransfer::SetupReceive
unsigned short setID;

/// The number of files that are in this set.
unsigned numberOfFilesInThisSet;

/// The total length of the transmitted files for this set, after being uncompressed
unsigned byteLengthOfThisSet;

/// The total length, in bytes, downloaded for this set.
unsigned bytesDownloadedForThisSet;

/// User data passed to one of the functions in the FileList class.
/// However, on error, this is instead changed to one of the enumerations in the PatchContext structure.
FileListNodeContext context;

Download speed is basically the send rate through RakNet assuming you aren't sending anything else at the time.

With TCPInterface there's no direct way to read it, but you can pretty much calculate it yourself with bytesDownloadedForThisSet / time since you started downloading


  • Not-a-newbie
  • *
  • Posts: 23
  • Karma: 1
    • View Profile
Re: AutoPatcher Features
« Reply #2 on: July 01, 2009, 10:47:26 AM »
Thanks for the quick reply...

I will give it a try ^_^