示例#1
0
 private void OnMoteMessageArrived(object sender, EventArgMessage msg)
 {
     if (!tcpClient.Connected)
     {
         return;
     }
     try {
         this.Send(msg.getMsg());
     } catch (Exception e) {
         RaiseEventClientDC(e.Message);
         this.tcpClient.Close();
     }
 }
示例#2
0
        private void OnTCPMessageArrived(object sender, EventArgMessage msg)
        {
            Thread moteMessenger = new Thread(new ParameterizedThreadStart(SendMessageToMote));

            moteMessenger.Start(msg.getMsg());
        }