Note that there are some explanatory texts on larger screens.

plurals
  1. PORCF for two way IPC
    primarykey
    data
    text
    <p>I am using RCF for Inter Process Communication in a project. Is there a way in RCF to create a bi directional channel. I will have server and client running in both processes. I was able to get one way commmunication working with Win32NamedPipes Here is the server</p> <pre><code>int main() { MyServiceImpl myServiceImpl; RCF::RcfServer server;//(RCF::TcpEndpoint("0.0.0.0", 50001)); server.addServerTransport(boost::shared_ptr&lt;RCF::I_ServerTransport&gt;(new RCF::Win32NamedPipeServerTransport(("rcfchannel")))); server.bind&lt;MyService&gt;(myServiceImpl); server.bind&lt;MyService&gt;(myServiceImpl); server.start(); server.waitForStopEvent(); return 0; } </code></pre> <p>Where MyService is the service it is implementing</p> <p>Client.cpp</p> <pre><code>int main() { try { std::vector&lt;std::string&gt; v; v.push_back("one"); v.push_back("two"); v.push_back("three"); std::cout &lt;&lt; "Before:\n"; std::copy( v.begin(), v.end(), std::ostream_iterator&lt;std::string&gt;(std::cout, "\n")); RcfClient&lt;MyService&gt;* m_service = new RcfClient&lt;MyService&gt;(RCF::Win32NamedPipeEndpoint("rcfchannel")); m_service-&gt;reverse(v); std::cout &lt;&lt; "\nAfter:\n"; std::copy( v.begin(), v.end(), std::ostream_iterator&lt;std::string&gt;(std::cout, "\n")); } catch(const std::exception &amp;e) { std::cout &lt;&lt; "Caught exception:\n"; std::cout &lt;&lt; "Type: " &lt;&lt; typeid(e).name() &lt;&lt; "\n"; std::cout &lt;&lt; "What: " &lt;&lt; e.what() &lt;&lt; "\n"; } return 0; } </code></pre> <p>Suppose I have another service say "ClientService" running on client side. Is there a way to convert this server to client? I found some convertRCFClienttoSession function in RCF. I didn't find any examples for it.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload