-
Notifications
You must be signed in to change notification settings - Fork 8
/
DhcpHost.cs
43 lines (36 loc) · 872 Bytes
/
DhcpHost.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;
using System.Text;
using WinDHCP.Library;
namespace WinDHCP
{
public partial class DhcpHost : ServiceBase
{
DhcpServer m_Server;
public DhcpHost(DhcpServer server)
{
InitializeComponent();
this.m_Server = server;
}
public void ManualStart(String[] args)
{
this.OnStart(args);
}
public void ManualStop()
{
this.OnStop();
}
protected override void OnStart(String[] args)
{
this.m_Server.Start();
}
protected override void OnStop()
{
this.m_Server.Stop();
}
}
}