Easy Simple Network Library  0.3.7
Public Member Functions | List of all members
esnlib::IoBufferManager Class Referenceabstract

IO Buffer Manager, it will work like a memory pool. More...

#include <IoBufferManager.h>

Inheritance diagram for esnlib::IoBufferManager:
esnlib::BufferManager

Public Member Functions

virtual BufferPtr GetFreeBuffer ()=0
 
virtual void TakeBack (BufferPtr buf)=0
 
virtual IoBufferPtr GetFreeBuffer (int bufsize)=0
 
virtual void TakeBack (IoBufferPtr buf)=0
 

Detailed Description

IO Buffer Manager, it will work like a memory pool.

Member Function Documentation

virtual BufferPtr esnlib::IoBufferManager::GetFreeBuffer ( )
pure virtual

Get a free buffer from the pool

Returns
The pointer of the free buffer

Implements esnlib::BufferManager.

virtual IoBufferPtr esnlib::IoBufferManager::GetFreeBuffer ( int  bufsize)
pure virtual

Get a free IO buffer from the pool

Parameters
bufsizeThe size of the buffer
Returns
The pointer of the free IO buffer
virtual void esnlib::IoBufferManager::TakeBack ( BufferPtr  buf)
pure virtual

Take the buffer back to the pool

Parameters
bufThe buffer

Implements esnlib::BufferManager.

virtual void esnlib::IoBufferManager::TakeBack ( IoBufferPtr  buf)
pure virtual

Take the IO buffer back to the pool

Parameters
bufThe pointer of the IO buffer

The documentation for this class was generated from the following file: