2024-01-22 11:58:24 +08:00
|
|
|
|
using NoSugarNet.ClientCore;
|
|
|
|
|
|
|
|
|
|
namespace NoSugarNet.ClientCli
|
|
|
|
|
{
|
|
|
|
|
internal class Program
|
|
|
|
|
{
|
2024-01-25 15:41:00 +08:00
|
|
|
|
static string Title = "NoSugarNetClient";
|
2024-01-22 11:58:24 +08:00
|
|
|
|
static void Main(string[] args)
|
|
|
|
|
{
|
2024-01-23 17:06:47 +08:00
|
|
|
|
if (!Config.LoadConfig())
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("配置文件错误");
|
|
|
|
|
Console.ReadLine();
|
|
|
|
|
return;
|
|
|
|
|
}
|
2024-01-25 15:41:00 +08:00
|
|
|
|
AppNoSugarNet.OnUpdateStatus += OnUpdateStatus;
|
2024-01-23 17:06:47 +08:00
|
|
|
|
AppNoSugarNet.Init(Config.ServerIP, Config.ServerPort);
|
2024-01-22 15:08:43 +08:00
|
|
|
|
while (true)
|
|
|
|
|
{
|
|
|
|
|
Console.ReadLine();
|
|
|
|
|
}
|
2024-01-22 11:58:24 +08:00
|
|
|
|
}
|
2024-01-25 15:41:00 +08:00
|
|
|
|
static void OnUpdateStatus(long resultReciveAllLenght, long resultSendAllLenght)
|
|
|
|
|
{
|
|
|
|
|
Console.Title = $"{Title} Recive:{resultReciveAllLenght} Send:{resultSendAllLenght}";
|
|
|
|
|
Console.WriteLine($"{Title} Recive:{resultReciveAllLenght} Send:{resultSendAllLenght}");
|
|
|
|
|
}
|
2024-01-22 11:58:24 +08:00
|
|
|
|
}
|
2024-01-25 15:41:00 +08:00
|
|
|
|
|
2024-01-22 11:58:24 +08:00
|
|
|
|
}
|