C# 클래스 SipSharp.Transports.BufferPool

Keeps a pool of byte buffers.
A simple flyweight pattern to avoid frequent allocation of small buffers.
파일 보기 프로젝트 열기: jgauffin/SipSharp

공개 메소드들

메소드 설명
BufferPool ( int bufferSize ) : System

Initializes a new instance of the BufferPool class.

Dequeue ( ) : byte[]

Get a buffer.

Will create one if queue is empty.

Enqueue ( byte buffer ) : void

Enqueues the specified buffer.

비공개 메소드들

메소드 설명
CreateBuffer ( ) : byte[]

Creates the buffer.

메소드 상세

BufferPool() 공개 메소드

Initializes a new instance of the BufferPool class.
public BufferPool ( int bufferSize ) : System
bufferSize int How large buffers to allocate.
리턴 System

Dequeue() 공개 메소드

Get a buffer.
Will create one if queue is empty.
public Dequeue ( ) : byte[]
리턴 byte[]

Enqueue() 공개 메소드

Enqueues the specified buffer.
Buffer is is less than the minimum requirement.
public Enqueue ( byte buffer ) : void
buffer byte Buffer to enqueue.
리턴 void