33 lines
695 B
C#
33 lines
695 B
C#
using FaceMachines.Services;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.ServiceProcess;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Face.WindowsService
|
|
{
|
|
public partial class FaceService : ServiceBase
|
|
{
|
|
public FaceService()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
protected override void OnStart(string[] args)
|
|
{
|
|
//开启监听
|
|
UDPHelp.StartReceive();
|
|
}
|
|
protected override void OnStop()
|
|
{
|
|
//关闭监听
|
|
UDPHelp.StopReceive();
|
|
}
|
|
}
|
|
}
|