var installer = ParallelGameInstaller.CreateAsCoreCount(new HttpClient());
var file = new GameFile("name")
{
Path = "absolute path of the file",
Hash = "SHA1 checksum, in hex string",
Size = 1024, // file size
Url = "URL to download the file",
};
await installer.Install([file], fileProgress, byteProgress, CancellationToken.None);
var installer = new BasicGameInstaller(new HttpClient());
멀티 스레드 인스톨러. CreateAsCoreCount
메서드는 현재 PC의 CPU 코어 수에 맞추어 새로운 ParallelGameInstaller
를 초기화합니다.
var installer = ParallelGameInstaller.CreateAsCoreCount(new HttpClient());
각 작업에 대해 스레드의 갯수를 직접 지정할 수도 있습니다.
var installer = new ParallelGameInstaller(
maxChecker: 4,
maxDownloader: 8,
boundedCapacity: 2048, // 다운로드 큐 크기
new HttpClient());