Stun Server  Compliant with the latest RFCs including 5389, 5769, and 5780
discover the local host's own external IP address
CBuffer Class Reference

#include <buffer.h>

Public Member Functions

 CBuffer ()
 
void Reset ()
 
 CBuffer (size_t nSize)
 
HRESULT InitWithAllocation (size_t size)
 
 CBuffer (uint8_t *pByteArray, size_t nByteArraySize, bool fCopy)
 
HRESULT InitWithAllocAndCopy (uint8_t *pByteArray, size_t nByteArraySize)
 
HRESULT InitNoAlloc (uint8_t *pByteArray, size_t nByteArraySize)
 
size_t GetSize ()
 
size_t GetAllocatedSize ()
 
HRESULT SetSize (size_t size)
 
uint8_t * GetData ()
 
bool IsValid ()
 

Private Member Functions

 CBuffer (const CBuffer &)
 
void operator= (const CBuffer &other)
 

Private Attributes

uint8_t * _data
 
size_t _size
 
size_t _allocatedSize
 
boost::scoped_array< uint8_t > _spAllocation
 

Detailed Description

Definition at line 27 of file buffer.h.

Constructor & Destructor Documentation

CBuffer::CBuffer ( const CBuffer )
private
CBuffer::CBuffer ( )

Definition at line 24 of file buffer.cpp.

CBuffer::CBuffer ( size_t  nSize)

Definition at line 42 of file buffer.cpp.

CBuffer::CBuffer ( uint8_t *  pByteArray,
size_t  nByteArraySize,
bool  fCopy 
)

Definition at line 110 of file buffer.cpp.

Member Function Documentation

size_t CBuffer::GetAllocatedSize ( )
inline

Definition at line 55 of file buffer.h.

uint8_t* CBuffer::GetData ( )
inline

Definition at line 60 of file buffer.h.

size_t CBuffer::GetSize ( )
inline

Definition at line 54 of file buffer.h.

HRESULT CBuffer::InitNoAlloc ( uint8_t *  pByteArray,
size_t  nByteArraySize 
)

Definition at line 74 of file buffer.cpp.

HRESULT CBuffer::InitWithAllocAndCopy ( uint8_t *  pByteArray,
size_t  nByteArraySize 
)

Definition at line 89 of file buffer.cpp.

HRESULT CBuffer::InitWithAllocation ( size_t  size)

Definition at line 48 of file buffer.cpp.

bool CBuffer::IsValid ( )

Definition at line 143 of file buffer.cpp.

void CBuffer::operator= ( const CBuffer other)
private
void CBuffer::Reset ( )

Definition at line 32 of file buffer.cpp.

HRESULT CBuffer::SetSize ( size_t  size)

Definition at line 126 of file buffer.cpp.

Member Data Documentation

size_t CBuffer::_allocatedSize
private

Definition at line 32 of file buffer.h.

uint8_t* CBuffer::_data
private

Definition at line 30 of file buffer.h.

size_t CBuffer::_size
private

Definition at line 31 of file buffer.h.

boost::scoped_array<uint8_t> CBuffer::_spAllocation
private

Definition at line 33 of file buffer.h.


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