Exemplo n.º 1
0
        public override void Update()
        {
            this.Recv();
            
            this.TimerOut();

            foreach (long id in updateChannels)
            {
                KChannel kChannel = this.Get(id);
                if (kChannel == null)
                {
                    continue;
                }

                if (kChannel.Id == 0)
                {
                    continue;
                }

                kChannel.Update();
            }

            this.updateChannels.Clear();
            
            this.RemoveConnectTimeoutChannels();
        }
Exemplo n.º 2
0
        public override void Update()
        {
            this.TimeNow = (uint)(TimeHelper.ClientNow() - this.StartTime);

            this.Recv();

            this.TimerOut();

            foreach (long id in updateChannels)
            {
                KChannel kChannel = this.GetKChannel(id);
                if (kChannel == null)
                {
                    continue;
                }
                if (kChannel.Id == 0)
                {
                    continue;
                }
                kChannel.Update();
            }
            this.updateChannels.Clear();

            while (this.removedChannels.Count > 0)
            {
                long     id = this.removedChannels.Dequeue();
                KChannel channel;
                if (!this.localConnChannels.TryGetValue(id, out channel))
                {
                    continue;
                }
                this.localConnChannels.Remove(id);
                channel.Dispose();
            }
        }