logger & tcp server

This commit is contained in:
rafi1212122
2023-05-25 21:46:59 +07:00
parent f294d9faa4
commit 358b2b7cca
6 changed files with 141 additions and 11 deletions

View File

@@ -1,6 +1,7 @@
using Common.Resources.Proto;
using Common;
using System.Net.NetworkInformation;
using PemukulPaku.Gameserver;
namespace PemukulPaku
{
@@ -8,15 +9,17 @@ namespace PemukulPaku
{
public static void Main()
{
Console.WriteLine("Hello!");
Global.c.Log("Starting...");
Global.config.Gameserver.Host = NetworkInterface.GetAllNetworkInterfaces().Where(i => i.NetworkInterfaceType != NetworkInterfaceType.Loopback && i.OperationalStatus == OperationalStatus.Up).First().GetIPProperties().UnicastAddresses.Where(a => a.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork).First().Address.ToString();
GetPlayerTokenRsp getPlayerTokenRsp = new()
{
Msg = "Hello!"
};
new Thread(HttpServer.Program.Main).Start();
Global.config.Gameserver.Host = NetworkInterface.GetAllNetworkInterfaces().Where(i => i.NetworkInterfaceType != NetworkInterfaceType.Loopback && i.OperationalStatus == OperationalStatus.Up).First().GetIPProperties().UnicastAddresses.Where(a => a.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork).First().Address.ToString();
Console.WriteLine(Global.config.Gameserver.Host);
new Thread(HttpServer.Program.Main).Start();
new Thread(Server.Start).Start();
Console.ReadKey(true);
}