reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
resip::StackThread Class Reference

This class is used to create a thread to run the SipStack in. More...

#include <StackThread.hxx>

Inheritance diagram for resip::StackThread:
[legend]

Public Member Functions

 StackThread (SipStack &stack)
 
virtual ~StackThread ()
 
virtual void thread ()
 
- Public Member Functions inherited from resip::ThreadIf
 ThreadIf ()
 
virtual ~ThreadIf ()
 
virtual void run ()
 
void join ()
 
void detach ()
 
virtual void shutdown ()
 
virtual bool waitForShutdown (int ms) const
 
bool isShutdown () const
 

Protected Member Functions

virtual void buildFdSet (FdSet &fdset)
 
virtual unsigned int getTimeTillNextProcessMS () const
 
virtual void beforeProcess ()
 
virtual void afterProcess ()
 

Additional Inherited Members

- Public Types inherited from resip::ThreadIf
typedef std::thread::id Id
 
typedef pthread_key_t TlsKey
 
typedef void TlsDestructor(void *)
 
- Static Public Member Functions inherited from resip::ThreadIf
static Id selfId ()
 
static int tlsKeyCreate (TlsKey &key, TlsDestructor *destructor)
 This function follows pthread_key_create() signature.
 
static int tlsKeyDelete (TlsKey key)
 This function follows pthread_key_delete() signature.
 
static int tlsSetValue (TlsKey key, const void *val)
 This function follows pthread_setspecific() signature.
 
static void * tlsGetValue (TlsKey key)
 This function follows pthread_getspecific() signature.
 
- Protected Attributes inherited from resip::ThreadIf
std::shared_ptr< std::thread > mThreadObj
 
Id mId
 
bool mShutdown
 
Mutex mShutdownMutex
 
Condition mShutdownCondition
 

Detailed Description

This class is used to create a thread to run the SipStack in.

The thread provides cycles to the SipStack by calling process. Process is called at least every 25ms, or sooner if select returns a signaled file descriptor.

Deprecated:
This is a deprecated method of giving the SipStack cycles. The current canonical example is EventStackThread.

Definition at line 23 of file StackThread.hxx.

Constructor & Destructor Documentation

◆ StackThread()

StackThread::StackThread ( SipStack &  stack)

Definition at line 10 of file StackThread.cxx.

◆ ~StackThread()

StackThread::~StackThread ( )
virtual

Definition at line 14 of file StackThread.cxx.

Member Function Documentation

◆ afterProcess()

virtual void resip::StackThread::afterProcess ( )
inlineprotectedvirtual

Definition at line 38 of file StackThread.hxx.

◆ beforeProcess()

virtual void resip::StackThread::beforeProcess ( )
inlineprotectedvirtual

Definition at line 37 of file StackThread.hxx.

◆ buildFdSet()

void StackThread::buildFdSet ( FdSet &  fdset)
protectedvirtual

Definition at line 70 of file StackThread.cxx.

◆ getTimeTillNextProcessMS()

unsigned int StackThread::getTimeTillNextProcessMS ( ) const
protectedvirtual

Definition at line 74 of file StackThread.cxx.

◆ thread()

void StackThread::thread ( )
virtual

Implements resip::ThreadIf.

Definition at line 35 of file StackThread.cxx.


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