Bayonne2 / Common C++ 2 Framework
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Attributes
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:
Inheritance graph
[legend]
Collaboration diagram for RTPSessionPool:
Collaboration graph
[legend]

Public Member Functions

 RTPSessionPool ()
 
virtual ~RTPSessionPool ()
 
bool addSession (RTPSessionBase &session)
 
bool removeSession (RTPSessionBase &session)
 
size_t getPoolLength () const
 
virtual void startRunning ()=0
 
bool isActive ()
 
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
 

Private Attributes

timeval poolTimeout
 
bool poolActive
 

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

Definition at line 157 of file pool.h.

Member Typedef Documentation

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

Definition at line 193 of file pool.h.

Constructor & Destructor Documentation

RTPSessionPool::RTPSessionPool ( )
virtual RTPSessionPool::~RTPSessionPool ( )
inlinevirtual

Definition at line 162 of file pool.h.

Member Function Documentation

bool RTPSessionPool::addSession ( RTPSessionBase session)
void RTPSessionBaseHandler::controlReceptionService ( RTPSessionBase s)
inlineinherited

Definition at line 74 of file pool.h.

void RTPSessionBaseHandler::controlTransmissionService ( RTPSessionBase s)
inlineinherited

Definition at line 78 of file pool.h.

size_t RTPSessionBaseHandler::dispatchDataPacket ( RTPSessionBase s)
inlineinherited

Definition at line 70 of file pool.h.

SOCKET RTPSessionBaseHandler::getControlRecvSocket ( RTPSessionBase s) const
inlineinherited

Definition at line 84 of file pool.h.

SOCKET RTPSessionBaseHandler::getDataRecvSocket ( RTPSessionBase s) const
inlineinherited

Definition at line 81 of file pool.h.

size_t RTPSessionPool::getPoolLength ( ) const
timeval RTPSessionPool::getPoolTimeout ( )
inlineprotected

Definition at line 183 of file pool.h.

timeval RTPSessionBaseHandler::getRTCPCheckInterval ( RTPSessionBase s)
inlineinherited

Definition at line 62 of file pool.h.

microtimeout_t RTPSessionBaseHandler::getSchedulingTimeout ( RTPSessionBase s)
inlineinherited

Definition at line 59 of file pool.h.

bool RTPSessionPool::isActive ( void  )
inline

Definition at line 176 of file pool.h.

bool RTPSessionPool::removeSession ( RTPSessionBase session)
void RTPSessionPool::setActive ( )
inlineprotected

Definition at line 180 of file pool.h.

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

Definition at line 186 of file pool.h.

void RTPSessionPool::setPoolTimeout ( struct timeval  to)
inlineprotected

Definition at line 189 of file pool.h.

virtual void RTPSessionPool::startRunning ( )
pure virtual

Implemented in SingleRTPSessionPool.

size_t RTPSessionBaseHandler::takeInDataPacket ( RTPSessionBase s)
inlineinherited

Definition at line 66 of file pool.h.

Field Documentation

SOCKET RTPSessionPool::highestSocket
protected

Definition at line 199 of file pool.h.

bool RTPSessionPool::poolActive
mutableprivate

Definition at line 204 of file pool.h.

ThreadLock RTPSessionPool::poolLock
mutableprotected

Definition at line 195 of file pool.h.

timeval RTPSessionPool::poolTimeout
private

Definition at line 203 of file pool.h.

fd_set RTPSessionPool::recvSocketSet
protected

Definition at line 198 of file pool.h.

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

Definition at line 192 of file pool.h.


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