Esempio n. 1
0
File: Ukcp.cs Progetto: sekkit/Fenix
        internal void release()
        {
            _kcp.State = -1;
            _kcp.release();

            IByteBuffer buffer;

            while (_writeQueue.TryDequeue(out buffer))
            {
                buffer.Release();
            }

            while (_readQueue.TryDequeue(out buffer))
            {
                buffer.Release();
            }
            _fecEncode?.release();
            _fecDecode?.release();
        }
Esempio n. 2
0
        public void release()
        {
            kcp.State = -1;
            kcp.release();

            IByteBuffer buffer = null;

            while (_writeQueue.TryDequeue(out buffer))
            {
                buffer.Release();
            }

            while (_readQueue.TryDequeue(out buffer))
            {
                buffer.Release();
            }
            Console.WriteLine("关闭");
            _fecEncode?.release();
            _fecDecode?.release();
        }
Esempio n. 3
0
 protected override bool TryDequeue(out ITask task)
 {
     return(_queue.TryDequeue(out task));
 }