Exemplo n.º 1
0
Arquivo: Ukcp.cs Projeto: 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();
        }
Exemplo 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();
        }
Exemplo n.º 3
0
 protected override bool TryDequeue(out ITask task)
 {
     return(_queue.TryDequeue(out task));
 }