TG.WXCRM.V4/WX.CRM.DataSynServer/CRMDataSynServer.cs

32 lines
743 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.ServiceProcess;
using WX.CRM.Common;
using WX.CRM.DataSynServer.Socket;
namespace WX.CRM.DataSynServer
{
public partial class CRMDataSynServer : ServiceBase
{
public CRMDataSynServer()
{
InitializeComponent();
}
protected override void OnStart(string[] args)
{
//启动Socket服务 用户接收客户端消息
if (!SocketServiceManage.Start())
{
LogHelper.Info("Socket服务启动失败");
this.Stop();
return;
}
}
protected override void OnStop()
{
//终止Socket服务
SocketServiceManage.Stop();
}
}
}