static void Main(string[] args) { StartServer(); Console.WriteLine("Started on https://" + _Hostname + ":" + _Port); while (_RunForever) { Console.Write("Command [? for help]: "); string userInput = Console.ReadLine(); if (String.IsNullOrEmpty(userInput)) { continue; } switch (userInput) { case "?": Menu(); break; case "q": _RunForever = false; break; case "c": case "cls": Console.Clear(); break; case "state": Console.WriteLine(_Server.IsListening); break; case "start": _Server.Start(); break; case "stop": _Server.Stop(); break; case "dispose": _Server.Dispose(); break; case "conn": ListConnections(); break; } } }