Click here to Skip to main content
15,897,371 members
Articles / Programming Languages / C++

RCF - Interprocess Communication for C++

Rate me:
Please Sign up or sign in to vote.
4.94/5 (147 votes)
25 Oct 2011CPOL20 min read 4.7M   8.4K   331  
A server/client IPC framework, using the C++ preprocessor as an IDL compiler.
<!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>RCF: RCF::I_Proactor Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.5 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li id="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="dirs.html"><span>Directories</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
  </ul></div>
<div class="nav">
<b>RCF</b>::<a class="el" href="class_r_c_f_1_1_i___proactor.html">I_Proactor</a></div>
<h1>RCF::I_Proactor Class Reference</h1><!-- doxytag: class="RCF::I_Proactor" --><code>#include &lt;<a class="el" href="_server_transport_8hpp-source.html">ServerTransport.hpp</a>&gt;</code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Interface by which the session manager reads/writes data on a given session. 
<p>
Each session has a polymorphic <a class="el" href="class_r_c_f_1_1_i___proactor.html">I_Proactor</a> object. 
<p>
<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"><a class="anchor" name="6a690844c0f497042eb493e77c25302d"></a><!-- doxytag: member="RCF::I_Proactor::~I_Proactor" ref="6a690844c0f497042eb493e77c25302d" args="()" -->
virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_c_f_1_1_i___proactor.html#6a690844c0f497042eb493e77c25302d">~I_Proactor</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Virtual destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="aa4c0e9bcbb3052905189cd133b42625"></a><!-- doxytag: member="RCF::I_Proactor::postRead" ref="aa4c0e9bcbb3052905189cd133b42625" args="()=0" -->
virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_c_f_1_1_i___proactor.html#aa4c0e9bcbb3052905189cd133b42625">postRead</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Posts a read request to the server transport. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7c8ef937177b4c244d481103d5aa02e3"></a><!-- doxytag: member="RCF::I_Proactor::postWrite" ref="7c8ef937177b4c244d481103d5aa02e3" args="()=0" -->
virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_c_f_1_1_i___proactor.html#7c8ef937177b4c244d481103d5aa02e3">postWrite</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Posts a write request to the server transport. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1944207143328d5edddc7795a08077e3"></a><!-- doxytag: member="RCF::I_Proactor::postClose" ref="1944207143328d5edddc7795a08077e3" args="()=0" -->
virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_c_f_1_1_i___proactor.html#1944207143328d5edddc7795a08077e3">postClose</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Posts a close request to the server transport. Not implemented. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual std::vector&lt; char &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_c_f_1_1_i___proactor.html#908ac4cf6b92ad7efcd03a6746c7f613">getWriteBuffer</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a reference to the write buffer of the session.  <a href="#908ac4cf6b92ad7efcd03a6746c7f613"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual std::size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_c_f_1_1_i___proactor.html#75f8c9a495e72db699d310ef9c59fe6d">getWriteOffset</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a value indicating where in the write buffer the user may commence writing.  <a href="#75f8c9a495e72db699d310ef9c59fe6d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual std::vector&lt; char &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_c_f_1_1_i___proactor.html#013fc54a486b904b25d9566421f03daf">getReadBuffer</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a reference to the internal read buffer of the session.  <a href="#013fc54a486b904b25d9566421f03daf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual std::size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_c_f_1_1_i___proactor.html#2ef880e115c376183e6931237ad44c18">getReadOffset</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a value indicating where in the read buffer the user should commence reading.  <a href="#2ef880e115c376183e6931237ad44c18"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="class_r_c_f_1_1_i___server_transport.html">I_ServerTransport</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_c_f_1_1_i___proactor.html#f98b4190570ff2aa5de95942d9042fcc">getServerTransport</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a reference to the server transport.  <a href="#f98b4190570ff2aa5de95942d9042fcc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const I_RemoteAddress &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_c_f_1_1_i___proactor.html#5a0de44d7cfaab58b634aec1ecf193b1">getRemoteAddress</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a I_RemoteAddress interface containing information on the remote address of the client of this session.  <a href="#5a0de44d7cfaab58b634aec1ecf193b1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_r_c_f_1_1_i___proactor.html#390b6bab82bf3a1dc894ea10a995f679">setTransportFilters</a> (const std::vector&lt; FilterPtr &gt; &amp;filters)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the transport filter sequence of this session, which will become active on the next read or write operation.  <a href="#390b6bab82bf3a1dc894ea10a995f679"></a><br></td></tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="013fc54a486b904b25d9566421f03daf"></a><!-- doxytag: member="RCF::I_Proactor::getReadBuffer" ref="013fc54a486b904b25d9566421f03daf" 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 std::vector&lt;char&gt;&amp; RCF::I_Proactor::getReadBuffer           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns a reference to the internal read buffer of the session. 
<p>
The user should not, and should have no need to, resize this buffer. <dl compact><dt><b>Returns:</b></dt><dd>Reference to the internal write buffer of the session. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="2ef880e115c376183e6931237ad44c18"></a><!-- doxytag: member="RCF::I_Proactor::getReadOffset" ref="2ef880e115c376183e6931237ad44c18" 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 std::size_t RCF::I_Proactor::getReadOffset           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns a value indicating where in the read buffer the user should commence reading. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>Offset into the read buffer. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="5a0de44d7cfaab58b634aec1ecf193b1"></a><!-- doxytag: member="RCF::I_Proactor::getRemoteAddress" ref="5a0de44d7cfaab58b634aec1ecf193b1" 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 const I_RemoteAddress&amp; RCF::I_Proactor::getRemoteAddress           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns a I_RemoteAddress interface containing information on the remote address of the client of this session. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>I_RemoteAddress reference. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="f98b4190570ff2aa5de95942d9042fcc"></a><!-- doxytag: member="RCF::I_Proactor::getServerTransport" ref="f98b4190570ff2aa5de95942d9042fcc" 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 <a class="el" href="class_r_c_f_1_1_i___server_transport.html">I_ServerTransport</a>&amp; RCF::I_Proactor::getServerTransport           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns a reference to the server transport. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>Reference to the server transport. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="908ac4cf6b92ad7efcd03a6746c7f613"></a><!-- doxytag: member="RCF::I_Proactor::getWriteBuffer" ref="908ac4cf6b92ad7efcd03a6746c7f613" 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 std::vector&lt;char&gt;&amp; RCF::I_Proactor::getWriteBuffer           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns a reference to the write buffer of the session. 
<p>
The user may resize the buffer, but not to a size below write offset. <dl compact><dt><b>Returns:</b></dt><dd>Reference to the internal write buffer of the session. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="75f8c9a495e72db699d310ef9c59fe6d"></a><!-- doxytag: member="RCF::I_Proactor::getWriteOffset" ref="75f8c9a495e72db699d310ef9c59fe6d" 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 std::size_t RCF::I_Proactor::getWriteOffset           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns a value indicating where in the write buffer the user may commence writing. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>Offset into the write buffer. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="390b6bab82bf3a1dc894ea10a995f679"></a><!-- doxytag: member="RCF::I_Proactor::setTransportFilters" ref="390b6bab82bf3a1dc894ea10a995f679" args="(const std::vector&lt; FilterPtr &gt; &amp;filters)=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 RCF::I_Proactor::setTransportFilters           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::vector&lt; FilterPtr &gt; &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>filters</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets the transport filter sequence of this session, which will become active on the next read or write operation. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>filters</em>&nbsp;</td><td>Sequence of filters to be used as transport filters on the session. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_server_transport_8hpp-source.html">ServerTransport.hpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 19 19:02:39 2006 for RCF by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.5 </small></address>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Australia Australia
Software developer, from Sweden and now living in Canberra, Australia, working on distributed C++ applications. When he is not programming, Jarl enjoys skiing and playing table tennis. He derives immense satisfaction from referring to himself in third person.

Comments and Discussions