public void OnStartClick() { CreateHttp3(); var list = new List <Http3Sharp.RequestParamaters> { new Http3Sharp.RequestParamaters { Path = Path, SaveFilePath = SaveFilePath, Headers = new Http3Sharp.Headers[4] { new Http3Sharp.Headers { Name = "hoge0", Value = "var0" }, new Http3Sharp.Headers { Name = "hoge1", Value = "var1" }, new Http3Sharp.Headers { Name = "hoge2", Value = "var2" }, new Http3Sharp.Headers { Name = "hoge3", Value = "var3" }, } } }; Http3.PublishRequest(list); StartButton.interactable = false; Body.text = string.Empty; }
public void OnStartClick() { CreateHttp3(MaxMultipleDownloadNum); // 1k-10M のデータを DownloadFileNum 個ダウンロードする TotalDownloadSize = 0; var list = new List <Http3Sharp.RequestParamaters>(); for (ulong num = 0; num < DownloadFileNum; ++num) { var fileSize = (ulong)new System.Random().Next(1, 1000) * 1024; TotalDownloadSize += fileSize; list.Add(new Http3Sharp.RequestParamaters { SaveFilePath = $"{WorkDir}\\{num}", Path = $"{fileSize}", }); } ; Http3.PublishRequest(list); StartButton.interactable = false; _completedDownloadFileNum = 0; }