Example #1
0
 void _mc_OnSent(MessagesCommunicator comm, WialonIPS.Message msg)
 {
     this.Log.PostHead("<<<", msg.ToString());
     if (msg.MsgType == MessageType.Message)
     {
         this.Messages.Sent((msg as WialonIPS.MessageMessage).Text);
     }
     if (this.Settings.SendPingPackets)
     {
         this.tmrPing.Change(this._ping_interval, this._ping_interval);
     }
 }
Example #2
0
 void _mc_OnReceive(MessagesCommunicator comm, WialonIPS.Message msg)
 {
     this.Log.PostHead(">>>", msg.ToString());
     if (msg.MsgType == MessageType.Message)
     {
         this.Messages.Received((msg as WialonIPS.MessageMessage).Text);
     }
     if (msg.MsgType == MessageType.LoginAns && !(msg as LoginAnsMessage).Success)
     {
         Disconnect();
     }
 }
Example #3
0
 static void _mc_OnReceive(MessagesCommunicator comm, WialonIPS.Message msg)
 {
     Console.WriteLine(">>>" + msg.ToString());
     if (msg.MsgType == MessageType.Message)
     {
         Console.WriteLine((msg as WialonIPS.MessageMessage).Text);
     }
     //this.Messages.Received((msg as WialonIPS.MessageMessage).Text);
     if (msg.MsgType == MessageType.LoginAns && !(msg as LoginAnsMessage).Success)
     {
         Disconnect();
     }
 }