mirror of
https://github.com/Stone-Red-Code/HyperbolicDownloader.git
synced 2026-09-08 23:41:05 +02:00
Fix code formatting and decrease host answer delay
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class FileCommands
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ApiManager.SendMessageNewLine(message, NotificationMessageType.Error);
|
ApiManager.SendMessageNewLine(message!, NotificationMessageType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,9 +108,10 @@ public class HostCommands
|
|||||||
|
|
||||||
string ipAddressInput = parts[0];
|
string ipAddressInput = parts[0];
|
||||||
string portInput = parts[1];
|
string portInput = parts[1];
|
||||||
IPAddress? ipAddress = null;
|
IPAddress? ipAddress;
|
||||||
|
|
||||||
_ = int.TryParse(portInput, out int port);
|
_ = int.TryParse(portInput, out int port);
|
||||||
|
|
||||||
if (port < 1000 || port >= 6000)
|
if (port < 1000 || port >= 6000)
|
||||||
{
|
{
|
||||||
ApiManager.SendMessageNewLine("Invalid port number!", NotificationMessageType.Error);
|
ApiManager.SendMessageNewLine("Invalid port number!", NotificationMessageType.Error);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class HostsManager
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
tcpClient.ConnectAsync(host.IPAddress, host.Port).Wait(1000);
|
tcpClient.ConnectAsync(host.IPAddress, host.Port).Wait(500);
|
||||||
Console.CursorLeft = 0;
|
Console.CursorLeft = 0;
|
||||||
if (tcpClient.Connected)
|
if (tcpClient.Connected)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user