C# Class Universal.Torrent.Client.Managers.BufferManager

Show file Open project: haroldma/Universal.Torrent

Public Properties

Property Type Description
EmptyBuffer byte[]

Public Methods

Method Description
BufferManager ( ) : System

The class that controls the allocating and deallocating of all byte[] buffers used in the engine.

FreeBuffer ( byte buffer ) : void
GetBuffer ( int minCapacity ) : byte[]
GetBuffer ( byte &buffer, int minCapacity ) : void

Allocates an existing buffer from the pool

Private Methods

Method Description
AllocateBuffers ( int number, BufferType type ) : void
GetBuffer ( byte &buffer, BufferType type ) : void

Allocates an existing buffer from the pool

Method Details

BufferManager() public method

The class that controls the allocating and deallocating of all byte[] buffers used in the engine.
public BufferManager ( ) : System
return System

FreeBuffer() public method

public FreeBuffer ( byte buffer ) : void
buffer byte
return void

GetBuffer() public method

public GetBuffer ( int minCapacity ) : byte[]
minCapacity int
return byte[]

GetBuffer() public method

Allocates an existing buffer from the pool
The old Buffer should have been recovered before getting a new buffer
public GetBuffer ( byte &buffer, int minCapacity ) : void
buffer byte The byte[]you want the buffer to be assigned to
minCapacity int The minimum capacity.
return void

Property Details

EmptyBuffer public static property

public static byte[] EmptyBuffer
return byte[]