static async Task Main(string[] args) { RunAria2(); _client = new Aria2Client("localhost", _aria2Port); var gid = await Demo.UriDownload(_client); await Task.Delay(3000); //wait 3 sec var downloadStatus = await Demo.GetStatus(_client, gid); Console.WriteLine($@" Dir:{downloadStatus.Dir} Speed:{downloadStatus.DownloadSpeed} Length:{downloadStatus.TotalLength} "); await Task.Delay(1000); downloadStatus = await Demo.GetStatus(_client, gid); Console.WriteLine($@" Dir:{downloadStatus.Dir} Speed:{downloadStatus.DownloadSpeed} Length:{downloadStatus.TotalLength} "); Console.ReadKey(); _client.Shutdown(); }
public static void Shutdown(Aria2Client aria2) { aria2?.Shutdown(); }