private void SendKeepAlive(Object src, ElapsedEventArgs e) { Packet pkt = new PeerKeepAliveRequest(sys.ID); this.SendPacket(pkt); System.Timers.Timer t = (System.Timers.Timer)src; t.Stop(); t.Dispose(); }
public PeerRadio(RadioSystem sys, IPEndPoint ipend) : base(sys, ipend) { this.sys.client.GotPeerRegisterReply += Client_GotPeerRegisterReply; this.sys.client.GetPeerKeepAliveReply += Client_GetPeerKeepAliveReply; //Start keep alive Packet pkt = new PeerKeepAliveRequest(sys.ID); this.SendPacket(pkt); }