ClientCacheManager.FileDownloader
A private class in Root.Township, Alta.Static. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.
Client: downloads one file from the joined server's web server (port 1761 unless the server says otherwise) into a local folder, retrying up to three times.
Constructors
Fields
4 private and internal fields
| Member | What it is |
|---|
private Dictionary<uint, byte[]> assembly | Dictionary of parts by index. Not used in this build. |
private TaskCompletionSource<IAltaFile> completionSource | Source behind Task. |
private uint partCount | Not used in this build. |
private uint totalBytes | Not used in this build. |
Properties
| Member | What it is |
|---|
IAltaFolder ClientFolder { get; } | Local folder the file is saved into (the cache folder when made by ClientCacheManager). |
string Name { get; } | File name, used both in the URL and as the local file name. |
string ServerFolder { get; } | Folder path on the server's web server, cache when made by ClientCacheManager. |
Task<IAltaFile> Task { get; } | Completes with the downloaded file, or null after the last failed attempt. |
Events
Methods
| Member | What it is |
|---|
async void Start() | Downloads over HTTP, deleting partial files and retrying with a growing delay. Completes Task with the file or null. |
Used in
Members of other types that take, return or hold a FileDownloader: