private void SendKeepAlive(Object src, ElapsedEventArgs e) { MasterKeepAliveRequest kapkt = new MasterKeepAliveRequest(this.sys.ID, this.sys.SystemType); this.SendPacket(kapkt); System.Timers.Timer t = (System.Timers.Timer)src; t.Stop(); t.Dispose(); }
private void HandleRegistrationPacket(object sender, PacketEventArgs e) { MasterRegistrationReply mrPkt = (MasterRegistrationReply)e.packet; this.id = mrPkt.ID; this.sys.client.GotRegistrationReply -= this.HandleRegistrationPacket; //Console.WriteLine("Found Master Radio {0}", this.id); //Start Keep Alive this.sys.client.GotMasterKeepAliveReply += new PacketHandler(this.HandleKeepAlive); MasterKeepAliveRequest kapkt = new MasterKeepAliveRequest(this.sys.ID, this.sys.SystemType); this.SendPacket(kapkt); }