forked from project-fika/Fika-ServerTools
-
Notifications
You must be signed in to change notification settings - Fork 1
/
FikaServerTools.cs
34 lines (29 loc) · 907 Bytes
/
FikaServerTools.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using FikaServerTools.Config;
using FikaServerTools.Networking;
namespace FikaServerTools
{
internal class FikaServerTools
{
public static FikaServerToolsConfig Config;
private static FikaNatPunchServer _fikaNatPunchServer;
static void Main(string[] args)
{
Config = ConfigManager.LoadFromArgs(args);
if (Config == null)
{
Console.WriteLine("Unable to load configuration from arguments.");
return;
}
if (Config.NatPunchServer.Enable)
{
_fikaNatPunchServer = new FikaNatPunchServer(Config.NatPunchServer);
_fikaNatPunchServer.Start();
while (true)
{
_fikaNatPunchServer.PollEvents();
Thread.Sleep(10);
}
}
}
}
}