protected override void OnStop() { try { log.InfoFormat("OnStop Start", _fileNm); //tcpServer.Stop(); server.Stop(); log.InfoFormat("OnStop End", _fileNm); } catch (Exception ex) { log.ErrorFormat("OnStop: {0}", ex); } }
static void Main(string[] args) { //Tracker.TcpServer.Main tcpServer = new Main(); //tcpServer.Start(); ////Console.WriteLine("{0} Protocols are configured", serverTasks.Count); //Console.WriteLine("Press [q] to quit the server"); //do //{ //} while (Console.ReadKey().KeyChar != 'q'); //tcpServer.Stop(); //Console.WriteLine("Done"); //Console.ReadLine(); server = new TcpServer.TcpServerSAEA.Main(); server.Start(); Console.ReadLine(); server.Stop(); }