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

#include <datastream.h>

Collaboration diagram for CDataStream:

Public Member Functions

 CDataStream ()
 
 CDataStream (CRefCountedBuffer &buffer)
 
HRESULT SetSizeHint (size_t size)
 
void SetNoGrow (bool fDisableGrow)
 
void Reset ()
 
void Attach (CRefCountedBuffer &buffer, bool fForWriting)
 
HRESULT Write (const void *data, size_t size)
 
HRESULT Read (void *data, size_t size)
 
HRESULT WriteUint8 (uint8_t val)
 
HRESULT WriteUint16 (uint16_t val)
 
HRESULT WriteUint32 (uint32_t val)
 
HRESULT WriteUint64 (uint64_t val)
 
HRESULT WriteInt8 (int8_t val)
 
HRESULT WriteInt16 (int16_t val)
 
HRESULT WriteInt32 (int32_t val)
 
HRESULT WriteInt64 (int64_t val)
 
HRESULT ReadUint8 (uint8_t *pVal)
 
HRESULT ReadUint16 (uint16_t *pVal)
 
HRESULT ReadUint32 (uint32_t *pVal)
 
HRESULT ReadUint64 (uint64_t *pVal)
 
HRESULT ReadInt8 (int8_t *pVal)
 
HRESULT ReadInt16 (int16_t *pVal)
 
HRESULT ReadInt32 (int32_t *pVal)
 
HRESULT ReadInt64 (int64_t *pVal)
 
HRESULT GetBuffer (CRefCountedBuffer *pRefCountedBuffer)
 
uint8_t * GetDataPointerUnsafe ()
 
HRESULT SeekDirect (size_t pos)
 
HRESULT SeekRelative (int nOffset)
 
size_t GetPos ()
 
size_t GetSize ()
 
bool IsEOF ()
 

Private Member Functions

HRESULT Grow (size_t newsize)
 

Private Attributes

CRefCountedBuffer _spBuffer
 
CBuffer_pBuffer
 
size_t _pos
 
bool _fNoGrow
 

Detailed Description

Definition at line 24 of file datastream.h.

Constructor & Destructor Documentation

CDataStream::CDataStream ( )

Definition at line 24 of file datastream.cpp.

CDataStream::CDataStream ( CRefCountedBuffer buffer)

Definition at line 33 of file datastream.cpp.

Member Function Documentation

void CDataStream::Attach ( CRefCountedBuffer buffer,
bool  fForWriting 
)

Definition at line 55 of file datastream.cpp.

HRESULT CDataStream::GetBuffer ( CRefCountedBuffer pRefCountedBuffer)

Definition at line 213 of file datastream.cpp.

uint8_t * CDataStream::GetDataPointerUnsafe ( )

Definition at line 231 of file datastream.cpp.

size_t CDataStream::GetPos ( )

Definition at line 177 of file datastream.cpp.

size_t CDataStream::GetSize ( )

Definition at line 182 of file datastream.cpp.

HRESULT CDataStream::Grow ( size_t  newsize)
private

Definition at line 84 of file datastream.cpp.

bool CDataStream::IsEOF ( )

Definition at line 171 of file datastream.cpp.

HRESULT CDataStream::Read ( void *  data,
size_t  size 
)

Definition at line 67 of file datastream.cpp.

HRESULT CDataStream::ReadInt16 ( int16_t *  pVal)
inline

Definition at line 64 of file datastream.h.

HRESULT CDataStream::ReadInt32 ( int32_t *  pVal)
inline

Definition at line 65 of file datastream.h.

HRESULT CDataStream::ReadInt64 ( int64_t *  pVal)
inline

Definition at line 66 of file datastream.h.

HRESULT CDataStream::ReadInt8 ( int8_t *  pVal)
inline

Definition at line 63 of file datastream.h.

HRESULT CDataStream::ReadUint16 ( uint16_t *  pVal)
inline

Definition at line 59 of file datastream.h.

HRESULT CDataStream::ReadUint32 ( uint32_t *  pVal)
inline

Definition at line 60 of file datastream.h.

HRESULT CDataStream::ReadUint64 ( uint64_t *  pVal)
inline

Definition at line 61 of file datastream.h.

HRESULT CDataStream::ReadUint8 ( uint8_t *  pVal)
inline

Definition at line 58 of file datastream.h.

void CDataStream::Reset ( )

Definition at line 47 of file datastream.cpp.

HRESULT CDataStream::SeekDirect ( size_t  pos)

Definition at line 187 of file datastream.cpp.

HRESULT CDataStream::SeekRelative ( int  nOffset)

Definition at line 207 of file datastream.cpp.

void CDataStream::SetNoGrow ( bool  fDisableGrow)

Definition at line 133 of file datastream.cpp.

HRESULT CDataStream::SetSizeHint ( size_t  size)

Definition at line 41 of file datastream.cpp.

HRESULT CDataStream::Write ( const void *  data,
size_t  size 
)

Definition at line 138 of file datastream.cpp.

HRESULT CDataStream::WriteInt16 ( int16_t  val)
inline

Definition at line 54 of file datastream.h.

HRESULT CDataStream::WriteInt32 ( int32_t  val)
inline

Definition at line 55 of file datastream.h.

HRESULT CDataStream::WriteInt64 ( int64_t  val)
inline

Definition at line 56 of file datastream.h.

HRESULT CDataStream::WriteInt8 ( int8_t  val)
inline

Definition at line 53 of file datastream.h.

HRESULT CDataStream::WriteUint16 ( uint16_t  val)
inline

Definition at line 49 of file datastream.h.

HRESULT CDataStream::WriteUint32 ( uint32_t  val)
inline

Definition at line 50 of file datastream.h.

HRESULT CDataStream::WriteUint64 ( uint64_t  val)
inline

Definition at line 51 of file datastream.h.

HRESULT CDataStream::WriteUint8 ( uint8_t  val)
inline

Definition at line 48 of file datastream.h.

Member Data Documentation

bool CDataStream::_fNoGrow
private

Definition at line 29 of file datastream.h.

CBuffer* CDataStream::_pBuffer
private

Definition at line 27 of file datastream.h.

size_t CDataStream::_pos
private

Definition at line 28 of file datastream.h.

CRefCountedBuffer CDataStream::_spBuffer
private

Definition at line 26 of file datastream.h.


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