protected override void OnStart(string[] args) { // TODO: 在此处添加代码以启动服务。 ServiceEnvironment.Instance.SetLogger(new Howell.ServiceModel.Log.ServiceEventLog(this.EventLogger)); m_server = new Howell5198ServerAppInstance(ServiceConfiguration.Instance.HW5198ServerPort); m_server.Start(); Program.PrintVersion(); }
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(); }