예제 #1
0
 public void Dispose()
 {
     if (udp != null) { udp.StopListener(); }
     udp = null;
 }
예제 #2
0
 public void StartDHCPServer()
 {
     // Function to start the DHCP server
     // Port 67 to receive, 68 to send
     try
     {
         // Start the DHCP server
         udp = new UDPAsync(67, 68, endpointIp);
         udp.dataReceived += new UDPAsync.DataReceivedEventHandler(UDPDataReceived);
     }
     catch (Exception)
     {
         // TODO: handle exception
         // Console.WriteLine(ex.Message);
     }
 }