コード例 #1
0
        public override void process()
        {
            if (!valid())
            {
                return;
            }

            kcp_.Update(Deps.KCP.TimeUtils.iclock());

            if (_packetReceiver != null)
            {
                _packetReceiver.process();
            }
        }
コード例 #2
0
        public override void process()
        {
            if (!valid())
            {
                return;
            }

            uint current = Deps.KCP.TimeUtils.iclock();

            if (current >= nextTickKcpUpdate)
            {
                kcp_.Update(current);
                nextTickKcpUpdate = kcp_.Check(current);
            }

            if (_packetReceiver != null)
            {
                _packetReceiver.process();
            }
        }