Add download speed to NetworkSocket

This commit is contained in:
Stone_Red
2023-12-14 12:29:17 +01:00
parent 661a506e76
commit d383d4d15b
4 changed files with 44 additions and 35 deletions
@@ -1,5 +1,6 @@
using HyperbolicDownloaderApi.Managment;
using HyperbolicDownloaderApi.Networking;
using HyperbolicDownloaderApi.Utilities;
using System.Diagnostics;
using System.Net;
@@ -58,6 +59,7 @@ public class HostCommands
index++;
ApiManager.SendNotificationMessageNewLine($"{index}) {host.IPAddress}:{host.Port}", NotificationMessageType.Info);
ApiManager.SendNotificationMessageNewLine($"Last active: {host.LastActive}", NotificationMessageType.Info);
ApiManager.SendNotificationMessageNewLine($"Download speed: {(host.DownloadSpeed <= 0 ? "N/A" : UnitFormatter.TransferRate(host.DownloadSpeed))}", NotificationMessageType.Info);
ApiManager.SendNotificationMessageNewLine(string.Empty, NotificationMessageType.Info);
}
Console.CursorTop--;