Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

RCF - Interprocess Communication for C++

, 25 Oct 2011
A server/client IPC framework, using the C++ preprocessor as an IDL compiler.
rcf-04.zip
RCF-0.4
demo
vs2003
RCF
Client
Server
doc
html
class_r_c_f_1_1_exception.png
class_r_c_f_1_1_filter.png
class_r_c_f_1_1_filter_factory.png
class_r_c_f_1_1_filter_service.png
class_r_c_f_1_1_identity_filter.png
class_r_c_f_1_1_identity_filter_factory.png
class_r_c_f_1_1_i___client_transport.png
class_r_c_f_1_1_i___endpoint.png
class_r_c_f_1_1_i___service.png
class_r_c_f_1_1_i___session_manager.png
class_r_c_f_1_1_multicast_client_transport.png
class_r_c_f_1_1_object_factory_service.png
class_r_c_f_1_1_open_ssl_encryption_filter.png
class_r_c_f_1_1_open_ssl_encryption_filter_factory.png
class_r_c_f_1_1_publishing_service.png
class_r_c_f_1_1_rcf_server.png
class_r_c_f_1_1_remote_exception.png
class_r_c_f_1_1_subscription_service.png
class_r_c_f_1_1_tcp_endpoint.png
class_r_c_f_1_1_udp_endpoint.png
class_r_c_f_1_1_zlib_stateful_compression_filter_factory.png
class_r_c_f_1_1_zlib_stateless_compression_filter_factory.png
doxygen.png
ftv2blank.png
ftv2doc.png
ftv2folderclosed.png
ftv2folderopen.png
ftv2lastnode.png
ftv2link.png
ftv2mlastnode.png
ftv2mnode.png
ftv2node.png
ftv2plastnode.png
ftv2pnode.png
ftv2vertline.png
tab_b.gif
tab_l.gif
tab_r.gif
latex
annotated.tex
class_r_c_f_1_1_client_stub.tex
class_r_c_f_1_1_exception.eps
class_r_c_f_1_1_exception.tex
class_r_c_f_1_1_filter.eps
class_r_c_f_1_1_filter.tex
class_r_c_f_1_1_filter_description.tex
class_r_c_f_1_1_filter_factory.eps
class_r_c_f_1_1_filter_factory.tex
class_r_c_f_1_1_filter_service.eps
class_r_c_f_1_1_filter_service.tex
class_r_c_f_1_1_identity_filter.eps
class_r_c_f_1_1_identity_filter.tex
class_r_c_f_1_1_identity_filter_factory.eps
class_r_c_f_1_1_identity_filter_factory.tex
class_r_c_f_1_1_i___client_transport.eps
class_r_c_f_1_1_i___client_transport.tex
class_r_c_f_1_1_i___endpoint.eps
class_r_c_f_1_1_i___endpoint.tex
class_r_c_f_1_1_i___proactor.tex
class_r_c_f_1_1_i___rcf_client.tex
class_r_c_f_1_1_i___server_transport.tex
class_r_c_f_1_1_i___server_transport_ex.tex
class_r_c_f_1_1_i___service.eps
class_r_c_f_1_1_i___service.tex
class_r_c_f_1_1_i___session.tex
class_r_c_f_1_1_i___session_manager.eps
class_r_c_f_1_1_i___session_manager.tex
class_r_c_f_1_1_multicast_client_transport.eps
class_r_c_f_1_1_multicast_client_transport.tex
class_r_c_f_1_1_object_factory_service.eps
class_r_c_f_1_1_object_factory_service.tex
class_r_c_f_1_1_open_ssl_encryption_filter.eps
class_r_c_f_1_1_open_ssl_encryption_filter.tex
class_r_c_f_1_1_open_ssl_encryption_filter_factory.eps
class_r_c_f_1_1_open_ssl_encryption_filter_factory.tex
class_r_c_f_1_1_publishing_service.eps
class_r_c_f_1_1_publishing_service.tex
class_r_c_f_1_1_rcf_server.eps
class_r_c_f_1_1_rcf_server.tex
class_r_c_f_1_1_remote_exception.eps
class_r_c_f_1_1_remote_exception.tex
class_r_c_f_1_1_subscription_service.eps
class_r_c_f_1_1_subscription_service.tex
class_r_c_f_1_1_tcp_endpoint.eps
class_r_c_f_1_1_tcp_endpoint.tex
class_r_c_f_1_1_udp_endpoint.eps
class_r_c_f_1_1_udp_endpoint.tex
class_r_c_f_1_1_zlib_stateful_compression_filter.tex
class_r_c_f_1_1_zlib_stateful_compression_filter_factory.eps
class_r_c_f_1_1_zlib_stateful_compression_filter_factory.tex
class_r_c_f_1_1_zlib_stateless_compression_filter.tex
class_r_c_f_1_1_zlib_stateless_compression_filter_factory.eps
class_r_c_f_1_1_zlib_stateless_compression_filter_factory.tex
dirs.tex
dir_G_3A_2FDevelopment_2Fbuild_2Fscripts_2Fwin_2FBuildRcf2_5FOutput_2FRCF_2D0_2E4_2Finclude_2F.tex
dir_G_3A_2FDevelopment_2Fbuild_2Fscripts_2Fwin_2FBuildRcf2_5FOutput_2FRCF_2D0_2E4_2Finclude_2FRCF_2F.tex
dir_G_3A_2FDevelopment_2Fbuild_2Fscripts_2Fwin_2FBuildRcf2_5FOutput_2FRCF_2D0_2E4_2Finclude_2FRCF_2FProtocol_2F.tex
doxygen.sty
Helvetica.ttf
hierarchy.tex
Makefile
refman.tex
struct_r_c_f_1_1_filter_id_comparison.tex
include
RCF
Marshal.inl
Protocol
RcfServer.inl
ServerStub.inl
test
util
Platform
Machine
SPARC
x86
OS
Unix
Windows
Threads
SF
src
RCF
Protocol
SF
test
borland
Jamfile
Jamrules
Jamfile
Jamrules
vs2003
RCF
RCF
RCFTest
client.pem
server.pem
rcf-09c.zip
RCF-0.9c
demo
vs2003
RCF
Client
Server
include
RCF
Marshal.inl
Protocol
RcfServer.inl
ServerStub.inl
test
util
Platform
Machine
SPARC
x86
OS
Unix
Windows
Threads
SF
src
RCF
Protocol
util
SF
test
bcc
Jamfile
Jamrules
data
caCertA.pem
caCertB.pem
certA.pem
certB.pem
ssCert1.pem
ssCert2.pem
Jamfile
Jamrules
vc6
Jamfile
Jamrules
#include <string>
#include <vector>

#include <RCF/test/TestMinimal.hpp>

#include <RCF/Idl.hpp>
#include <RCF/RcfServer.hpp>
#include <RCF/ObjectFactoryService.hpp>

#include <RCF/test/TransportFactories.hpp>
#include <RCF/test/ThreadGroup.hpp>
#include <RCF/util/CommandLine.hpp>
#include <RCF/util/PortNumbers.hpp>

namespace Test_General {

    namespace A {

        RCF_BEGIN( Calculator, "Calculator" )
            RCF_METHOD_R2(double, add, double, double)
            RCF_METHOD_R2(double, sub, double, double)
            RCF_METHOD_R2(double, mul, double, double)
            RCF_METHOD_R2(double, div, double, double)
            RCF_METHOD_V3(void, add, double, double, double&)
            RCF_METHOD_V3(void, sub, double, double, double&)
            RCF_METHOD_V3(void, mul, double, double, double&)
            RCF_METHOD_V3(void, div, double, double, double&)
            RCF_METHOD_V1(void, M_in, double)
            RCF_METHOD_V1(void, M_plus, double)
            RCF_METHOD_R0(double, RcM)
            RCF_METHOD_V1(void, RcM, double&)
        RCF_END( Calculator )

        RCF_BEGIN( X, "X" )
            RCF_METHOD_R0(int, fr0)
            RCF_METHOD_R1(int, fr1, int)
            RCF_METHOD_R2(int, fr2, int, int)
            RCF_METHOD_R3(int, fr3, int, int, int)
            RCF_METHOD_R4(int, fr4, int, int, int, int)
            RCF_METHOD_R5(int, fr5, int, int, int, int, int)
            RCF_METHOD_R6(int, fr6, int, int, int, int, int, int)
            RCF_METHOD_R7(int, fr7, int, int, int, int, int, int, int)
            RCF_METHOD_R8(int, fr8, int, int, int, int, int, int, int, int)
            RCF_METHOD_V0(void, fv0)
            RCF_METHOD_V1(void, fv1, int)
            RCF_METHOD_V2(void, fv2, int, int)
            RCF_METHOD_V3(void, fv3, int, int, int)
            RCF_METHOD_V4(void, fv4, int, int, int, int)
            RCF_METHOD_V5(void, fv5, int, int, int, int, int)
            RCF_METHOD_V6(void, fv6, int, int, int, int, int, int)
            RCF_METHOD_V7(void, fv7, int, int, int, int, int, int, int)
            RCF_METHOD_V8(void, fv8, int, int, int, int, int, int, int, int)
        RCF_END( X )

        RCF_BEGIN( Y, "I_Y" )
            RCF_METHOD_R1(int, f01, int)
            RCF_METHOD_R1(int, f02, int)
            RCF_METHOD_R1(int, f03, int)
            RCF_METHOD_R1(int, f04, int)
            RCF_METHOD_R1(int, f05, int)
            RCF_METHOD_R1(int, f06, int)
            RCF_METHOD_R1(int, f07, int)
            RCF_METHOD_R1(int, f08, int)
            RCF_METHOD_R1(int, f09, int)
            RCF_METHOD_R1(int, f10, int)
            RCF_METHOD_R1(int, f11, int)
            RCF_METHOD_R1(int, f12, int)
            RCF_METHOD_R1(int, f13, int)
            RCF_METHOD_R1(int, f14, int)
            RCF_METHOD_R1(int, f15, int)
            RCF_METHOD_R1(int, f16, int)
            RCF_METHOD_R1(int, f17, int)
            RCF_METHOD_R1(int, f18, int)
            RCF_METHOD_R1(int, f19, int)
            RCF_METHOD_R1(int, f20, int)
            RCF_METHOD_R1(int, f21, int)
            RCF_METHOD_R1(int, f22, int)
            RCF_METHOD_R1(int, f23, int)
            RCF_METHOD_R1(int, f24, int)
            RCF_METHOD_R1(int, f25, int)
            RCF_METHOD_R1(int, f26, int)
            RCF_METHOD_R1(int, f27, int)
            RCF_METHOD_R1(int, f28, int)
            RCF_METHOD_R1(int, f29, int)
            RCF_METHOD_R1(int, f30, int)
            RCF_METHOD_R1(int, f31, int)
            RCF_METHOD_R1(int, f32, int)
            RCF_METHOD_R1(int, f33, int)
            RCF_METHOD_R1(int, f34, int)
            RCF_METHOD_R1(int, f35, int)
        RCF_END( Y )

        RCF_BEGIN(
            Z,
            "ReallyLongInterfaceName_"
            "01234567890123456789012345678901234567890123456789"
            "01234567890123456789012345678901234567890123456789"
            "01234567890123456789012345678901234567890123456789"
            "01234567890123456789012345678901234567890123456789"
            "01234567890123456789012345678901234567890123456789"
            "01234567890123456789012345678901234567890123456789")
                RCF_METHOD_R1(std::string, echo, const std::string &)
        RCF_END(Z)

    } //namespace A


    namespace A {
    namespace B {

    class CalculatorDivideByZeroException : public std::exception {
    public:
        CalculatorDivideByZeroException(std::string msg) : msg_(msg) {}
        ~CalculatorDivideByZeroException() throw() {}
        const char *what() const throw() { return msg_.c_str(); }
    private:
        std::string msg_;
    };

    class Calculator {
    public:
        Calculator() : M_(0) {}

        double add(double x, double y)        { return x+y; }
        double sub(double x, double y)        { return x-y; }
        double mul(double x, double y)        { return x*y; }
        double div(double x, double y)        { if (y==0) throw CalculatorDivideByZeroException("Divide by zero"); return x/y; }

        void add(double x, double y, double &z)    { z = x+y; }
        void sub(double x, double y, double &z)    { z = x-y; }
        void mul(double x, double y, double &z)    { z = x*y; }
        void div(double x, double y, double &z)    { if (y==0) throw int(5); z = x/y; }

        void M_in(double x)            { M_ = x; }
        void M_plus(double x)            { M_ += x; }
        double RcM()                { return M_; }
        void RcM(double &x)            { x = M_; }

    private:
        Calculator(const Calculator &);
        Calculator &operator=(const Calculator &);
        double M_;
    };

    class X {
    public:
        int fr0() { return 1; }
        int fr1(int) { return 1; }
        int fr2(int, int) { return 1; }
        int fr3(int, int, int) { return 1; }
        int fr4(int, int, int, int) { return 1; }
        int fr5(int, int, int, int, int) { return 1; }
        int fr6(int, int, int, int, int, int) { return 1; }
        int fr7(int, int, int, int, int, int, int) { return 1; }
        int fr8(int, int, int, int, int, int, int, int) { return 1; }
        void fv0() {}
        void fv1(int) {}
        void fv2(int, int) {}
        void fv3(int, int, int) {}
        void fv4(int, int, int, int) {}
        void fv5(int, int, int, int, int) {}
        void fv6(int, int, int, int, int, int) {}
        void fv7(int, int, int, int, int, int, int) {}
        void fv8(int, int, int, int, int, int, int, int) {}
    };

    class Y {
    public:
        int f01(int) { return 1; }
        int f02(int) { return 1; }
        int f03(int) { return 1; }
        int f04(int) { return 1; }
        int f05(int) { return 1; }
        int f06(int) { return 1; }
        int f07(int) { return 1; }
        int f08(int) { return 1; }
        int f09(int) { return 1; }
        int f10(int) { return 1; }
        int f11(int) { return 1; }
        int f12(int) { return 1; }
        int f13(int) { return 1; }
        int f14(int) { return 1; }
        int f15(int) { return 1; }
        int f16(int) { return 1; }
        int f17(int) { return 1; }
        int f18(int) { return 1; }
        int f19(int) { return 1; }
        int f20(int) { return 1; }
        int f21(int) { return 1; }
        int f22(int) { return 1; }
        int f23(int) { return 1; }
        int f24(int) { return 1; }
        int f25(int) { return 1; }
        int f26(int) { return 1; }
        int f27(int) { return 1; }
        int f28(int) { return 1; }
        int f29(int) { return 1; }
        int f30(int) { return 1; }
        int f31(int) { return 1; }
        int f32(int) { return 1; }
        int f33(int) { return 1; }
        int f34(int) { return 1; }
        int f35(int) { return 1; }
    };

    class Z
    {
    public:
        std::string echo(const std::string &s)
        {
            return s;
        }
    };


    } // namespace B
    } // namespace A

    inline bool fuzzy_eq(double d1, double d2, float tolerance = .1)
    {
        return (d1-d2)*(d1-d2) < tolerance;
    }

    void testCalculatorClient(const RCF::I_ClientTransport &clientTransport)
    {

        using namespace A;

        RcfClient<Calculator> calc1(clientTransport.clone());

        {
            const RcfClient<Calculator> &clientConstRef = calc1;
            std::size_t timeoutMs = clientConstRef.getClientStub().getRemoteCallTimeoutMs();

            RcfClient<Calculator> &clientRef = calc1;
            clientRef.getClientStub().setRemoteCallTimeoutMs(timeoutMs);

            std::vector<RcfClient<Calculator> > clients1(10);
            std::vector<RcfClient<Calculator> > clients2(10);
            clients2.assign(clients1.begin(),clients1.end());
        }

        //bool ok = RCF::createRemoteObject<Calculator>(calc1);
        bool ok = tryCreateRemoteObject<Calculator>(calc1);
        BOOST_CHECK(ok);


        RcfClient<Calculator> calc2 = calc1;
        RcfClient<Calculator> calc3;
        calc3 = calc1;
        RcfClient<Calculator> calc4(calc3);

        double ret = 0;
        double x = 0;
        double y = 0;

        x = 1.5;
        y = 2.5;
        ret = calc1.add(x,y); BOOST_CHECK( fuzzy_eq(ret, x+y) );
        ret = calc1.sub(x,y); BOOST_CHECK( fuzzy_eq(ret, x-y) );
        ret = calc1.mul(x,y); BOOST_CHECK( fuzzy_eq(ret, x*y) );
        ret = calc1.div(x,y); BOOST_CHECK( fuzzy_eq(ret, x/y) );

        x = 1.5;
        y = 2.5;
        ret = calc2.add(x,y); BOOST_CHECK( fuzzy_eq(ret, x+y) );
        ret = calc2.sub(x,y); BOOST_CHECK( fuzzy_eq(ret, x-y) );
        ret = calc2.mul(x,y); BOOST_CHECK( fuzzy_eq(ret, x*y) );
        ret = calc2.div(x,y); BOOST_CHECK( fuzzy_eq(ret, x/y) );

        x = 1.5;
        y = 2.5;
        ret = calc3.add(x,y); BOOST_CHECK( fuzzy_eq(ret, x+y) );
        ret = calc3.sub(x,y); BOOST_CHECK( fuzzy_eq(ret, x-y) );
        ret = calc3.mul(x,y); BOOST_CHECK( fuzzy_eq(ret, x*y) );
        ret = calc3.div(x,y); BOOST_CHECK( fuzzy_eq(ret, x/y) );

        x = 1.5;
        y = 2.5;
        ret = calc4.add(x,y); BOOST_CHECK( fuzzy_eq(ret, x+y) );
        ret = calc4.sub(x,y); BOOST_CHECK( fuzzy_eq(ret, x-y) );
        ret = calc4.mul(x,y); BOOST_CHECK( fuzzy_eq(ret, x*y) );
        ret = calc4.div(x,y); BOOST_CHECK( fuzzy_eq(ret, x/y) );

        x = 3.14;
        y = -2.718;
        calc4.add(x,y, ret); BOOST_CHECK( fuzzy_eq(ret, x+y) );
        calc4.sub(x,y, ret); BOOST_CHECK( fuzzy_eq(ret, x-y) );
        calc4.mul(x,y, ret); BOOST_CHECK( fuzzy_eq(ret, x*y) );
        calc4.div(x,y, ret); BOOST_CHECK( fuzzy_eq(ret, x/y) );

        x = 1;
        y = 2;
        ret = 1;
        ret = calc1.RcM(); BOOST_CHECK( fuzzy_eq(ret, 0) );
        calc2.M_in(x);
        calc3.M_plus(y);
        calc4.RcM(ret); BOOST_CHECK( fuzzy_eq(ret, x+y) );
        calc1.M_in(0);
        ret = calc2.RcM(); BOOST_CHECK( fuzzy_eq(ret, 0) );

        {
            RcfClient<X> x(clientTransport.clone());
            x.fr0();
            x.fr1(1);
            x.fr2(1,1);
            x.fr3(1,1,1);
            x.fr4(1,1,1,1);
            x.fr5(1,1,1,1,1);
            x.fr6(1,1,1,1,1,1);
            x.fr7(1,1,1,1,1,1,1);
            x.fr8(1,1,1,1,1,1,1,1);
            x.fv0();
            x.fv1(1);
            x.fv2(1,1);
            x.fv3(1,1,1);
            x.fv4(1,1,1,1);
            x.fv5(1,1,1,1,1);
            x.fv6(1,1,1,1,1,1);
            x.fv7(1,1,1,1,1,1,1);
            x.fv8(1,1,1,1,1,1,1,1);
        }
        {
            RcfClient<Y> y(clientTransport.clone());
            y.f01(1);
            y.f02(1);
            y.f03(1);
            y.f04(1);
            y.f05(1);
            y.f06(1);
            y.f07(1);
            y.f08(1);
            y.f09(1);
            y.f10(1);
            y.f11(1);
            y.f12(1);
            y.f13(1);
            y.f14(1);
            y.f15(1);
            y.f16(1);
            y.f17(1);
            y.f18(1);
            y.f19(1);
            y.f20(1);
            y.f21(1);
            y.f22(1);
            y.f23(1);
            y.f24(1);
            y.f25(1);
            y.f26(1);
            y.f27(1);
            y.f28(1);
            y.f29(1);
            y.f30(1);
            y.f31(1);
            y.f32(1);
            y.f33(1);
            y.f34(1);
            y.f35(1);
        }
        {
            RcfClient<Z> z(clientTransport.clone());
            std::string s = "asdf";
            BOOST_CHECK(s == z.echo(s));
        }

        x = 1;
        y = 1;

        ret = 0;
        ret = calc4.add(1,1); BOOST_CHECK( fuzzy_eq(ret, 2) );
        ret = calc4.add(1,1); BOOST_CHECK( fuzzy_eq(ret, 2) );

        ret = 0;
        ret = calc4.add(RCF::Oneway, 1,1); BOOST_CHECK( fuzzy_eq(ret, 0) );
        ret = calc4.add(RCF::Oneway, 1,1); BOOST_CHECK( fuzzy_eq(ret, 0) );
        ret = calc4.add(RCF::Oneway, 1,1); BOOST_CHECK( fuzzy_eq(ret, 0) );

        ret = 0;
        calc4.add(RCF::Oneway, 1,1, ret); BOOST_CHECK( fuzzy_eq(ret, 0) );
        calc4.add(RCF::Oneway, 1,1, ret); BOOST_CHECK( fuzzy_eq(ret, 0) );
        calc4.add(RCF::Oneway, 1,1, ret); BOOST_CHECK( fuzzy_eq(ret, 0) );

        ret = 0;
        ret = calc4.add(1,1); BOOST_CHECK( fuzzy_eq(ret, 2) );
        ret = calc4.add(1,1); BOOST_CHECK( fuzzy_eq(ret, 2) );


        // Test propagation of remote std::exception derived exceptions
        x = 1;
        y = 0;
        try
        {
        ret = calc1.div(x,y);
        BOOST_CHECK(1==0);
        }
        catch(const RCF::RemoteException &e)
        {
            RCF_TRACE("RCF::RemoteException caught")(e);
            BOOST_CHECK(1==1);
        }

    /*
    #ifndef __BORLANDC__ // Scopeguard bug with Borland C++... causes theses tests to crash

        // Test propagation of remote non-std::exception derived exeptions
        x = 1;
        y = 0;
        ret = 0;
        try
        {
            calc.div(x,y, ret);
            BOOST_CHECK(1==0);
        }
        catch(const RCF::RemoteException &e)
        {
            RCF_TRACE("RCF::RemoteException caught")(e);
            BOOST_CHECK(1==1);
        }

        // check that the server is still alive....
        x = 1;
        y = 1;
        ret = 0;
        ret = calc.div(x,y);
        BOOST_CHECK( fuzzy_eq(ret, 1) );

        {
            RcfClient<Calculator> mycalc(ip, port);
            x = 1;
            y = 1;
            ret = 0;
            ret = mycalc.div(x,y);
            BOOST_CHECK( fuzzy_eq(ret, 1) );
        }

    #endif //! __BORLANDC__
    */
    }

    void testCalculatorClientReps(boost::shared_ptr<RCF::I_ClientTransport> clientTransportPtr, int nReps)
    {
        try
        {
            for (int i=0; i<nReps; ++i)
            {
                testCalculatorClient(*clientTransportPtr);
            }
        }
        catch(...)
        {
            BOOST_CHECK(1==0);
        }
    }

} // namespace Test_General

int RCF_TEST_MAIN(int argc, char **argv)
{
    printTestHeader(__FILE__);

    using namespace Test_General;

    util::CommandLine::getSingleton().parse(argc, argv);

    for (std::size_t i=0; i<RCF::getTransportFactories().size(); ++i)
    {
        RCF::TransportFactoryPtr transportFactoryPtr = RCF::getTransportFactories()[i];
        std::pair<RCF::ServerTransportPtr, RCF::ClientTransportAutoPtrPtr> transports = transportFactoryPtr->createTransports();
        RCF::ServerTransportPtr serverTransportPtr( transports.first );
        RCF::ClientTransportAutoPtr clientTransportAutoPtr( *transports.second );

        RCF::writeTransportTypes(std::cout, *serverTransportPtr, *clientTransportAutoPtr);

        RCF::RcfServer server(serverTransportPtr);

        unsigned int numberOfTokens = 50;
        unsigned int objectTimeoutS = 60;
        RCF::ObjectFactoryServicePtr objectFactoryServicePtr( new RCF::ObjectFactoryService(numberOfTokens, objectTimeoutS) );
        objectFactoryServicePtr->bind( (A::Calculator*) 0, (A::B::Calculator**) 0);
        objectFactoryServicePtr->bind( (A::X*) 0, (A::B::X**) 0);
        server.addService( RCF::ServicePtr(objectFactoryServicePtr) );

        A::B::Calculator calculator;
        server.bind( (A::Calculator*) 0, calculator);

        A::B::X x;
        server.bind( (A::X*) 0, x);

        A::B::Y y;
        server.bind( (A::Y*) 0, y);

        A::B::Z z;
        server.bind( (A::Z*) 0, z);

        server.start();

        int nReps = 2;

        boost::shared_ptr<RCF::I_ClientTransport> clientTransportPtr(
                clientTransportAutoPtr->clone().release());

        testCalculatorClientReps(clientTransportPtr, nReps);

        server.stop();
    }

    return boost::exit_success;
}

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)

Share

About the Author

Jarl Lindrud

Australia Australia
Software developer, ex-resident of Sweden and now living in Canberra, Australia, working on distributed C++ applications. Jarl enjoys programming, but prefers skiing and playing table tennis. He derives immense satisfaction from referring to himself in third person.

| Advertise | Privacy | Mobile
Web01 | 2.8.140926.1 | Last Updated 25 Oct 2011
Article Copyright 2005 by Jarl Lindrud
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid