Example #1
0
 //回复数据的方法
 void SendData(object sender)
 {
     try
     {
         TcpBussiness.SendCommand(tcp);
         //TcpBussiness.SendData(tcp);
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #2
0
 //回复数据的方法
 void SendData()
 {
     while (true)
     {
         try
         {
             TcpBussiness.SendCommand(tcp);
             //TcpBussiness.SendData(tcp);
         }
         catch (Exception ex)
         {
             Service.ServiceControl.log.Error(DateTime.Now + ex.ToString());
         }
         Thread.Sleep(500);
     }
 }