<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>ccRTP: RTPSessionPool Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.4 --> <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a> | <a class="qindex" href="examples.html">Examples</a></div> <h1>RTPSessionPool Class Reference</h1><!-- doxytag: class="RTPSessionPool" --><!-- doxytag: inherits="RTPSessionBaseHandler" -->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. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="pool_8h-source.html">pool.h</a>></code> <p> <p>Inheritance diagram for RTPSessionPool: <p><center><img src="class_r_t_p_session_pool.png" usemap="#RTPSessionPool_map" border="0" alt=""></center> <map name="RTPSessionPool_map"> <area href="class_r_t_p_session_base_handler.html" alt="RTPSessionBaseHandler" shape="rect" coords="0,0,152,24"> <area href="class_single_r_t_p_session_pool.html" alt="SingleRTPSessionPool" shape="rect" coords="0,112,152,136"> </map> <a href="class_r_t_p_session_pool-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_p_session_pool.html#a0">RTPSessionPool</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_p_session_pool.html#a1">~RTPSessionPool</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_p_session_pool.html#a2">addSession</a> (<a class="el" href="class_r_t_p_session_base.html">RTPSessionBase</a> &session)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_p_session_pool.html#a3">removeSession</a> (<a class="el" href="class_r_t_p_session_base.html">RTPSessionBase</a> &session)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_p_session_pool.html#a4">getPoolLength</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_p_session_pool.html#a5">startRunning</a> ()=0</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_p_session_pool.html#a6">isActive</a> ()</td></tr> <tr><td colspan="2"><br><h2>Protected Types</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::list< <a class="el" href="class_r_t_p_session_base.html">RTPSessionBase</a> <br> * >::iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_p_session_pool.html#x0">PoolIterator</a></td></tr> <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_p_session_pool.html#b0">setActive</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">timeval </td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_p_session_pool.html#b1">getPoolTimeout</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_p_session_pool.html#b2">setPoolTimeout</a> (int sec, int usec)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_p_session_pool.html#b3">setPoolTimeout</a> (struct timeval to)</td></tr> <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">std::list< <a class="el" href="class_r_t_p_session_base.html">RTPSessionBase</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_p_session_pool.html#p0">sessionList</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">fd_set </td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_p_session_pool.html#p1">recvSocketSet</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">SOCKET </td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_t_p_session_pool.html#p2">highestSocket</a></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> 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. <p> Derived classes are responsible for serving each RTP session with a thread at least.<p> In order to use the RTP session "pool" you just have to build <a class="el" href="class_r_t_p_session_base.html">RTPSessionBase</a> objects for each RTP session (instead of RTPSession objects). Then, add the <a class="el" href="class_r_t_p_session_base.html">RTPSessionBase</a> objects to an RTP session "pool" and call <a class="el" href="class_r_t_p_session_pool.html#a5">startRunning()</a> method of the session pool.<p> <dl compact><dt><b>Author:</b></dt><dd>Federico Montesino Pouzols <<a href="mailto:fedemp@altern.org">fedemp@altern.org</a>></dd></dl> <p> <hr><h2>Member Typedef Documentation</h2> <a class="anchor" name="x0"></a><!-- doxytag: member="RTPSessionPool::PoolIterator" ref="x0" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">typedef std::list<<a class="el" href="class_r_t_p_session_base.html">RTPSessionBase</a>*>::iterator <a class="el" href="class_r_t_p_session_pool.html#x0">RTPSessionPool::PoolIterator</a><code> [protected]</code> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="a0"></a><!-- doxytag: member="RTPSessionPool::RTPSessionPool" ref="a0" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">RTPSessionPool::RTPSessionPool </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <a class="anchor" name="a1"></a><!-- doxytag: member="RTPSessionPool::~RTPSessionPool" ref="a1" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">virtual RTPSessionPool::~RTPSessionPool </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline, virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="a2"></a><!-- doxytag: member="RTPSessionPool::addSession" ref="a2" args="(RTPSessionBase &session)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">bool RTPSessionPool::addSession </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="class_r_t_p_session_base.html">RTPSessionBase</a> & </td> <td class="mdname1" valign="top" nowrap> <em>session</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <a class="anchor" name="a4"></a><!-- doxytag: member="RTPSessionPool::getPoolLength" ref="a4" args="() const " --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">size_t RTPSessionPool::getPoolLength </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <a class="anchor" name="b1"></a><!-- doxytag: member="RTPSessionPool::getPoolTimeout" ref="b1" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">timeval RTPSessionPool::getPoolTimeout </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline, protected]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <a class="anchor" name="a6"></a><!-- doxytag: member="RTPSessionPool::isActive" ref="a6" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">bool RTPSessionPool::isActive </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <a class="anchor" name="a3"></a><!-- doxytag: member="RTPSessionPool::removeSession" ref="a3" args="(RTPSessionBase &session)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">bool RTPSessionPool::removeSession </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="class_r_t_p_session_base.html">RTPSessionBase</a> & </td> <td class="mdname1" valign="top" nowrap> <em>session</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <a class="anchor" name="b0"></a><!-- doxytag: member="RTPSessionPool::setActive" ref="b0" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void RTPSessionPool::setActive </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline, protected]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <a class="anchor" name="b3"></a><!-- doxytag: member="RTPSessionPool::setPoolTimeout" ref="b3" args="(struct timeval to)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void RTPSessionPool::setPoolTimeout </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">struct timeval </td> <td class="mdname1" valign="top" nowrap> <em>to</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline, protected]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <a class="anchor" name="b2"></a><!-- doxytag: member="RTPSessionPool::setPoolTimeout" ref="b2" args="(int sec, int usec)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void RTPSessionPool::setPoolTimeout </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">int </td> <td class="mdname" nowrap> <em>sec</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>usec</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [inline, protected]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <a class="anchor" name="a5"></a><!-- doxytag: member="RTPSessionPool::startRunning" ref="a5" args="()=0" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">virtual void RTPSessionPool::startRunning </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [pure virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> <p> Implemented in <a class="el" href="class_single_r_t_p_session_pool.html#a2">SingleRTPSessionPool</a>. </td> </tr> </table> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="p2"></a><!-- doxytag: member="RTPSessionPool::highestSocket" ref="p2" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">SOCKET <a class="el" href="class_r_t_p_session_pool.html#p2">RTPSessionPool::highestSocket</a><code> [protected]</code> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <a class="anchor" name="p1"></a><!-- doxytag: member="RTPSessionPool::recvSocketSet" ref="p1" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">fd_set <a class="el" href="class_r_t_p_session_pool.html#p1">RTPSessionPool::recvSocketSet</a><code> [protected]</code> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <a class="anchor" name="p0"></a><!-- doxytag: member="RTPSessionPool::sessionList" ref="p0" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">std::list<<a class="el" href="class_r_t_p_session_base.html">RTPSessionBase</a>*> <a class="el" href="class_r_t_p_session_pool.html#p0">RTPSessionPool::sessionList</a><code> [protected]</code> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="pool_8h-source.html">pool.h</a></ul> <hr size="1"><address style="align: right;"><small>Generated on Fri Dec 9 22:32:04 2005 for ccRTP by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address> </body> </html>