Esempio n. 1
0
 public void Dispose()
 {
     if (udp != null) { udp.StopListener(); }
     udp = null;
 }
Esempio n. 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);
     }
 }