コード例 #1
0
        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();
        }
コード例 #2
0
        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);
        }