ccRTP
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
RTPSessionPool Class Referenceabstract

This class is a base class for classes that define a group of RTP sessions that will be served by one or more execution threads. More...

#include <pool.h>

Inheritance diagram for RTPSessionPool:
RTPSessionBaseHandler SingleRTPSessionPool

Public Member Functions

 RTPSessionPool ()
 
virtual ~RTPSessionPool ()
 
bool addSession (RTPSessionBase &session)
 
bool removeSession (RTPSessionBase &session)
 
size_t getPoolLength () const
 
virtual void startRunning ()=0
 
bool isActive ()
 
- Public Member Functions inherited from RTPSessionBaseHandler
microtimeout_t getSchedulingTimeout (RTPSessionBase &s)
 
timeval getRTCPCheckInterval (RTPSessionBase &s)
 
size_t takeInDataPacket (RTPSessionBase &s)
 
size_t dispatchDataPacket (RTPSessionBase &s)
 
void controlReceptionService (RTPSessionBase &s)
 
void controlTransmissionService (RTPSessionBase &s)
 
SOCKET getDataRecvSocket (RTPSessionBase &s) const
 
SOCKET getControlRecvSocket (RTPSessionBase &s) const
 

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
 

Detailed Description

This class is a base class for classes that define a group of RTP sessions that will be served by one or more execution threads.

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.

Author
Federico Montesino Pouzols fedem.nosp@m.p@al.nosp@m.tern..nosp@m.org

Member Typedef Documentation

◆ PoolIterator

typedef std::list<SessionListElement*>::iterator RTPSessionPool::PoolIterator
protected

Constructor & Destructor Documentation

◆ RTPSessionPool()

RTPSessionPool::RTPSessionPool ( )

◆ ~RTPSessionPool()

virtual RTPSessionPool::~RTPSessionPool ( )
inlinevirtual

Member Function Documentation

◆ addSession()

bool RTPSessionPool::addSession ( RTPSessionBase session)

◆ getPoolLength()

size_t RTPSessionPool::getPoolLength ( ) const

◆ getPoolTimeout()

timeval RTPSessionPool::getPoolTimeout ( )
inlineprotected

◆ isActive()

bool RTPSessionPool::isActive ( )
inline

◆ removeSession()

bool RTPSessionPool::removeSession ( RTPSessionBase session)

◆ setActive()

void RTPSessionPool::setActive ( )
inlineprotected

◆ setPoolTimeout() [1/2]

void RTPSessionPool::setPoolTimeout ( int  sec,
int  usec 
)
inlineprotected

◆ setPoolTimeout() [2/2]

void RTPSessionPool::setPoolTimeout ( struct timeval  to)
inlineprotected

◆ startRunning()

virtual void RTPSessionPool::startRunning ( )
pure virtual

Implemented in SingleRTPSessionPool.

Member Data Documentation

◆ highestSocket

SOCKET RTPSessionPool::highestSocket
protected

◆ poolLock

ThreadLock RTPSessionPool::poolLock
mutableprotected

◆ recvSocketSet

fd_set RTPSessionPool::recvSocketSet
protected

◆ sessionList

std::list<SessionListElement*> RTPSessionPool::sessionList
protected

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