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

#include <server.h>

Inheritance diagram for CStunServer:
Collaboration diagram for CStunServer:

Public Member Functions

HRESULT Initialize (const CStunServerConfig &config)
 
HRESULT Shutdown ()
 
HRESULT Start ()
 
HRESULT Stop ()
 
 ADDREF_AND_RELEASE_IMPL ()
 
- Public Member Functions inherited from CBasicRefCount
 CBasicRefCount ()
 
virtual ~CBasicRefCount ()
 
int InternalAddRef ()
 
int InternalRelease ()
 
virtual void OnFinalRelease ()
 
- Public Member Functions inherited from IRefCounted
virtual int AddRef ()=0
 
virtual int Release ()=0
 

Private Member Functions

 CStunServer ()
 
 ~CStunServer ()
 
HRESULT AddSocket (TransportAddressSet *pTSA, SocketRole role, const CSocketAddress &addrListen, const CSocketAddress &addrAdvertise)
 

Private Attributes

CStunSocket _arrSockets [4]
 
std::vector< CStunSocketThread * > _threads
 
CRefCountedPtr< IStunAuth_spAuth
 

Friends

class CObjectFactory< CStunServer >
 

Additional Inherited Members

- Static Public Member Functions inherited from CObjectFactory< CStunServer >
static HRESULT CreateInstanceNoInit (X **ppInstance)
 
static HRESULT CreateInstance (I **ppI)
 
static HRESULT CreateInstance (A paramA, I **ppI)
 
static HRESULT CreateInstance (A paramA, B paramB, I **ppI)
 
- Protected Attributes inherited from CBasicRefCount
int m_nRefs
 

Detailed Description

Definition at line 57 of file server.h.

Constructor & Destructor Documentation

CStunServer::CStunServer ( )
private

Definition at line 42 of file server.cpp.

CStunServer::~CStunServer ( )
private

Definition at line 48 of file server.cpp.

Member Function Documentation

CStunServer::ADDREF_AND_RELEASE_IMPL ( )
HRESULT CStunServer::AddSocket ( TransportAddressSet pTSA,
SocketRole  role,
const CSocketAddress addrListen,
const CSocketAddress addrAdvertise 
)
private

Definition at line 53 of file server.cpp.

HRESULT CStunServer::Initialize ( const CStunServerConfig config)

Definition at line 95 of file server.cpp.

HRESULT CStunServer::Shutdown ( )

Definition at line 188 of file server.cpp.

HRESULT CStunServer::Start ( )

Definition at line 217 of file server.cpp.

HRESULT CStunServer::Stop ( )

Definition at line 243 of file server.cpp.

Friends And Related Function Documentation

friend class CObjectFactory< CStunServer >
friend

Definition at line 70 of file server.h.

Member Data Documentation

CStunSocket CStunServer::_arrSockets[4]
private

Definition at line 63 of file server.h.

CRefCountedPtr<IStunAuth> CStunServer::_spAuth
private

Definition at line 72 of file server.h.

std::vector<CStunSocketThread*> CStunServer::_threads
private

Definition at line 65 of file server.h.


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