示例#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);
 }
示例#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();
 }