internal void InitializePool(IOPool pool) { if (IOPool != null) throw new NotSupportedException("Cannot reset IOPool"); if (pool == null) throw new ArgumentNullException("pool"); IOPool = pool; OnPoolInitialization(); }
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; }
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); } }
internal ClientController(IOPool pool) { Pool = pool; }
internal DataSentController(IOPool pool) : base(pool) { }
internal DataReceivedController(IOPool pool) : base(pool) { }