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