示例#1
0
        internal void InitializePool(IOPool pool)
        {
            if (IOPool != null)
                throw new NotSupportedException("Cannot reset IOPool");

            if (pool == null)
                throw new ArgumentNullException("pool");

            IOPool = pool;
            OnPoolInitialization();
        }
示例#2
0
        internal static IEnumerable<Block> createRandomBlocks(int blockSize, int blockCount, IOPool pool)
        {
            var result = new List<Block>();
            for (var i = 0; i < blockCount; ++i)
            {
                var data = new byte[blockSize];
                var block = pool.CreateConstantBlock(data);
                result.Add(block);
            }

            return result;
        }
示例#3
0
        internal NetworkManager(IOPool pool)
        {
            _pool = pool;
            _clientSlots = new ClientInternal[pool.Configuration.MaxClientCount];
            _freeSlots = new Stack<int>(_clientSlots.Length);

            for (var i = 0; i < _clientSlots.Length; ++i)
            {
                var clientInternal = new ClientInternal(this, i);
                _clientSlots[i] = clientInternal;
                _freeSlots.Push(i);
            }
        }
示例#4
0
 internal ClientController(IOPool pool)
 {
     Pool = pool;
 }
示例#5
0
 internal DataSentController(IOPool pool)
     : base(pool)
 {
 }
示例#6
0
 internal DataReceivedController(IOPool pool)
     : base(pool)
 {
 }