//回复数据的方法 void SendData(object sender) { try { //UdpBussiness.SendData(udp); UdpBussiness.SendCommand(udp); } catch (Exception ex) { } }
//回复数据的方法 void SendData() { while (true) { try { UdpBussiness.SendCommand(udp); } catch (Exception ex) { Service.ServiceControl.log.Error(DateTime.Now + ex.ToString()); } Thread.Sleep(500); } }