Exemple #1
0
        static void StartApp()
        {
            Console.Title = "Host Start:" + DateTime.Now.ToString("yyyyMMddHHmmss");
            Trace.WriteLine(Console.Title);
            ServerHost host = new ServerHost();

            host.Open();
            var input = string.Empty;

            do
            {
                Console.WriteLine("Press 'q' Key To Exit...");
                input = Console.ReadLine();
            } while (!string.Equals(input, "q", StringComparison.OrdinalIgnoreCase));
        }
Exemple #2
0
 protected override void OnStart(string[] args)
 {
     _host = new ServerHost();
     _host.Open();
 }