예제 #1
0
파일: Ukcp.cs 프로젝트: 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();
        }
예제 #2
0
파일: Ukcp.cs 프로젝트: dora-BYR/Fenix
        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();
        }