Server.Network.BufferPool.BufferPool C# (CSharp) Méthode

BufferPool() public méthode

public BufferPool ( string name, int initialCapacity, int bufferSize ) : System.Collections.Generic
name string
initialCapacity int
bufferSize int
Résultat System.Collections.Generic
		public BufferPool( string name, int initialCapacity, int bufferSize )
		{
			m_Name = name;

			m_InitialCapacity = initialCapacity;
			m_BufferSize = bufferSize;

			m_FreeBuffers = new Queue<byte[]>( initialCapacity );

			for ( int i = 0; i < initialCapacity; ++i )
				m_FreeBuffers.Enqueue( new byte[bufferSize] );

			lock ( m_Pools )
				m_Pools.Add( this );
		}