Exemplo n.º 1
0
        static void Main(string[] args)
        {
            //Howell5198ClientTest clienttest = new Howell5198ClientTest("192.168.19.51", 5198);
            //clienttest.Run();
            //Console.ReadLine();

            Howell5198ServerAppInstance server = new Howell5198ServerAppInstance(ServiceConfiguration.Instance.HW5198ServerPort);

            server.Start();
            //Console.WriteLine("输入'q'停止服务");
            //while (Console.ReadKey().KeyChar != 'q')
            //{
            //    Console.WriteLine();
            //    continue;
            //}
            Console.ReadLine();
            server.Stop();
            Console.ReadLine();
        }
Exemplo n.º 2
0
 protected override void OnStop()
 {
     // TODO:  在此处添加代码以执行停止服务所需的关闭操作。
     m_server.Stop();
     ServiceEnvironment.Instance.Logger.Info("Service Stopped.");
 }