static void WaitForCommands(ServerLogic ServerLogic) { string command = ""; while (command != commands.exit.ToString()) { command = Console.ReadLine()[1..];
static void Main(string[] args) { ServerLogic Logic = new ServerLogic(ConsolePrint); Console.WriteLine("server starting ..."); Start(Logic); WaitForCommands(Logic); }
static async void Start(ServerLogic ServerLogic) { await Task.Run(() => ServerLogic.Start()); }
static void Main(string[] args) { ServerLogic.Start(); ServerLogic.Run(); }