|
reSIProcate
SIP stack, Dialog Usage Manager and related libraries
|
This class is used to create a thread to run the SipStack in. More...
#include <InterruptableStackThread.hxx>
Public Member Functions | |
| InterruptableStackThread (SipStack &stack, SelectInterruptor &si) | |
| virtual | ~InterruptableStackThread () |
| virtual void | thread () |
| virtual void | shutdown () |
Public Member Functions inherited from resip::ThreadIf | |
| ThreadIf () | |
| virtual | ~ThreadIf () |
| virtual void | run () |
| void | join () |
| void | detach () |
| virtual bool | waitForShutdown (int ms) const |
| bool | isShutdown () const |
Protected Member Functions | |
| virtual void | buildFdSet (FdSet &fdset) |
| virtual unsigned int | getTimeTillNextProcessMS () const |
| virtual void | process (FdSet &fdset) |
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 |
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 when select returns a signaled file descriptor.
This implementation improves on StackThread, by providing a fully blocking architecture (ie. no need to wake up every 25ms), since posting to TransactionState will cause the SelectInterruptor to be invoked.
You must register SelectInterrupter as an AsyncProcessHandler on the SipStack in order to use this class. This is done by providing SelectInterrupter to the constructor of SipStack. This should be the same SelectInterrupter provided when constructing this class.
Definition at line 28 of file InterruptableStackThread.hxx.
| InterruptableStackThread::InterruptableStackThread | ( | SipStack & | stack, |
| SelectInterruptor & | si | ||
| ) |
Definition at line 11 of file InterruptableStackThread.cxx.
|
virtual |
Definition at line 16 of file InterruptableStackThread.cxx.
|
protectedvirtual |
Definition at line 82 of file InterruptableStackThread.cxx.
|
protectedvirtual |
Definition at line 87 of file InterruptableStackThread.cxx.
|
protectedvirtual |
Definition at line 94 of file InterruptableStackThread.cxx.
|
virtual |
Reimplemented from resip::ThreadIf.
Definition at line 75 of file InterruptableStackThread.cxx.
|
virtual |
Implements resip::ThreadIf.
Definition at line 37 of file InterruptableStackThread.cxx.