Stun Server  Compliant with the latest RFCs including 5389, 5769, and 5780
discover the local host's own external IP address
CPoll Class Reference
Inheritance diagram for CPoll:
Collaboration diagram for CPoll:

Public Member Functions

virtual HRESULT Initialize (size_t maxSockets)
 
virtual HRESULT Close ()
 
virtual HRESULT Add (int fd, uint32_t eventflags)
 
virtual HRESULT Remove (int fd)
 
virtual HRESULT ChangeEventSet (int fd, uint32_t eventflags)
 
virtual HRESULT WaitForNextEvent (PollEvent *pPollEvent, int timeoutMilliseconds)
 
 CPoll ()
 
 ~CPoll ()
 
 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

void Reindex ()
 
uint32_t ToNativeFlags (uint32_t eventflags)
 
uint32_t FromNativeFlags (uint32_t eventflags)
 
bool FindNextEvent (PollEvent *pEvent)
 

Private Attributes

std::vector< pollfd > _fds
 
uint32_t _rotation
 
uint32_t _unreadcount
 
bool _fInitialized
 
FastHashDynamic< int, size_t > _hashtable
 

Additional Inherited Members

- Static Public Member Functions inherited from CObjectFactory< CPoll >
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 245 of file polling.cpp.

Constructor & Destructor Documentation

CPoll::CPoll ( )

Definition at line 279 of file polling.cpp.

CPoll::~CPoll ( )

Definition at line 287 of file polling.cpp.

Member Function Documentation

HRESULT CPoll::Add ( int  fd,
uint32_t  eventflags 
)
virtual

Implements IPolling.

Definition at line 347 of file polling.cpp.

CPoll::ADDREF_AND_RELEASE_IMPL ( )
HRESULT CPoll::ChangeEventSet ( int  fd,
uint32_t  eventflags 
)
virtual

Implements IPolling.

Definition at line 413 of file polling.cpp.

HRESULT CPoll::Close ( )
virtual

Implements IPolling.

Definition at line 339 of file polling.cpp.

bool CPoll::FindNextEvent ( PollEvent pEvent)
private

Definition at line 479 of file polling.cpp.

uint32_t CPoll::FromNativeFlags ( uint32_t  eventflags)
private

Definition at line 309 of file polling.cpp.

HRESULT CPoll::Initialize ( size_t  maxSockets)
virtual

Implements IPolling.

Definition at line 326 of file polling.cpp.

void CPoll::Reindex ( )
private
HRESULT CPoll::Remove ( int  fd)
virtual

Implements IPolling.

Definition at line 366 of file polling.cpp.

uint32_t CPoll::ToNativeFlags ( uint32_t  eventflags)
private

Definition at line 292 of file polling.cpp.

HRESULT CPoll::WaitForNextEvent ( PollEvent pPollEvent,
int  timeoutMilliseconds 
)
virtual

Implements IPolling.

Definition at line 436 of file polling.cpp.

Member Data Documentation

std::vector<pollfd> CPoll::_fds
private

Definition at line 251 of file polling.cpp.

bool CPoll::_fInitialized
private

Definition at line 254 of file polling.cpp.

FastHashDynamic<int, size_t> CPoll::_hashtable
private

Definition at line 256 of file polling.cpp.

uint32_t CPoll::_rotation
private

Definition at line 252 of file polling.cpp.

uint32_t CPoll::_unreadcount
private

Definition at line 253 of file polling.cpp.


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