ccRTP 2.1.2
 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 154 of file pool.h.

Member Typedef Documentation

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

Definition at line 190 of file pool.h.

Constructor & Destructor Documentation

RTPSessionPool::RTPSessionPool ( )

Definition at line 46 of file pool.cpp.

virtual RTPSessionPool::~RTPSessionPool ( )
inlinevirtual

Definition at line 159 of file pool.h.

Member Function Documentation

bool RTPSessionPool::addSession ( RTPSessionBase session)

Definition at line 56 of file pool.cpp.

void RTPSessionBaseHandler::controlReceptionService ( RTPSessionBase s)
inlineinherited

Definition at line 71 of file pool.h.

void RTPSessionBaseHandler::controlTransmissionService ( RTPSessionBase s)
inlineinherited

Definition at line 75 of file pool.h.

size_t RTPSessionBaseHandler::dispatchDataPacket ( RTPSessionBase s)
inlineinherited

Definition at line 67 of file pool.h.

SOCKET RTPSessionBaseHandler::getControlRecvSocket ( RTPSessionBase s) const
inlineinherited

Definition at line 81 of file pool.h.

SOCKET RTPSessionBaseHandler::getDataRecvSocket ( RTPSessionBase s) const
inlineinherited

Definition at line 78 of file pool.h.

size_t RTPSessionPool::getPoolLength ( ) const

Definition at line 99 of file pool.cpp.

timeval RTPSessionPool::getPoolTimeout ( )
inlineprotected

Definition at line 180 of file pool.h.

timeval RTPSessionBaseHandler::getRTCPCheckInterval ( RTPSessionBase s)
inlineinherited

Definition at line 59 of file pool.h.

microtimeout_t RTPSessionBaseHandler::getSchedulingTimeout ( RTPSessionBase s)
inlineinherited

Definition at line 56 of file pool.h.

bool RTPSessionPool::isActive ( )
inline

Definition at line 173 of file pool.h.

bool RTPSessionPool::removeSession ( RTPSessionBase session)

Definition at line 77 of file pool.cpp.

void RTPSessionPool::setActive ( )
inlineprotected

Definition at line 177 of file pool.h.

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

Definition at line 183 of file pool.h.

void RTPSessionPool::setPoolTimeout ( struct timeval  to)
inlineprotected

Definition at line 186 of file pool.h.

virtual void RTPSessionPool::startRunning ( )
pure virtual

Implemented in SingleRTPSessionPool.

size_t RTPSessionBaseHandler::takeInDataPacket ( RTPSessionBase s)
inlineinherited

Definition at line 63 of file pool.h.

Field Documentation

SOCKET RTPSessionPool::highestSocket
protected

Definition at line 196 of file pool.h.

bool RTPSessionPool::poolActive
mutableprivate

Definition at line 201 of file pool.h.

ThreadLock RTPSessionPool::poolLock
mutableprotected

Definition at line 192 of file pool.h.

timeval RTPSessionPool::poolTimeout
private

Definition at line 200 of file pool.h.

fd_set RTPSessionPool::recvSocketSet
protected

Definition at line 195 of file pool.h.

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

Definition at line 189 of file pool.h.


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