#include <pool.h>
Public Member Functions | |
RTPSessionPool () | |
virtual | ~RTPSessionPool () |
bool | addSession (RTPSessionBase &session) |
bool | removeSession (RTPSessionBase &session) |
size_t | getPoolLength () const |
virtual void | startRunning ()=0 |
bool | isActive () |
Protected Types | |
typedef std::list < SessionListElement * > ::iterator | PoolIterator |
Protected Member Functions | |
void | setActive () |
timeval | getPoolTimeout () |
void | setPoolTimeout (int sec, int usec) |
void | setPoolTimeout (struct timeval to) |
Protected Attributes | |
std::list< SessionListElement * > | sessionList |
ThreadLock | poolLock |
fd_set | recvSocketSet |
SOCKET | highestSocket |
Derived classes are responsible for serving each RTP session with a thread at least.
In order to use the RTP session "pool" you just have to build RTPSessionBase objects for each RTP session (instead of RTPSession objects). Then, add the RTPSessionBase objects to an RTP session "pool" and call startRunning() method of the session pool.
typedef std::list<SessionListElement*>::iterator RTPSessionPool::PoolIterator [protected] |
RTPSessionPool::RTPSessionPool | ( | ) |
virtual RTPSessionPool::~RTPSessionPool | ( | ) | [inline, virtual] |
bool RTPSessionPool::addSession | ( | RTPSessionBase & | session | ) |
bool RTPSessionPool::removeSession | ( | RTPSessionBase & | session | ) |
size_t RTPSessionPool::getPoolLength | ( | ) | const |
virtual void RTPSessionPool::startRunning | ( | ) | [pure virtual] |
Implemented in SingleRTPSessionPool.
bool RTPSessionPool::isActive | ( | ) | [inline] |
void RTPSessionPool::setActive | ( | ) | [inline, protected] |
timeval RTPSessionPool::getPoolTimeout | ( | ) | [inline, protected] |
void RTPSessionPool::setPoolTimeout | ( | int | sec, | |
int | usec | |||
) | [inline, protected] |
void RTPSessionPool::setPoolTimeout | ( | struct timeval | to | ) | [inline, protected] |
std::list<SessionListElement*> RTPSessionPool::sessionList [protected] |
ThreadLock RTPSessionPool::poolLock [mutable, protected] |
fd_set RTPSessionPool::recvSocketSet [protected] |
SOCKET RTPSessionPool::highestSocket [protected] |