Table of Contents
This chapter describes various flavors of the remote procedure call (RPC) mechanisms provided by the Massiv. RPC allows you to call methods of managed objects, even if they are not owned by local node, using syntax nearly identical to that of local calls.
To be able to call a method, it must be described in the IDL of its class. If you are not acquainted with the IDL concept yet, refer to Chapter 9, Introduction to IDL. In all examples in this chapter, it's assumed that a class Foo with the following IDL description exists:
class Foo : Massiv::Core::Object { method< const > bar( out int32 result, in int32 param ) : bool; method baz( out int32 result, in int32 param ) : bool; }; |
Both methods, bar and baz, take single in argument (param) and return boolean type and single out argument (result). Method bar is constant.
Moreover, it's assumed that a valid remote pointer to object of type Foo, foo, exists. To be able to use Remote pointer to class Foo defined in the IDL description contained in foo.idl, one must include the generated header foo_rpc.h:
#include "foo_rpc.h" Remote< Foo > foo = ...; |
To see how to obtain such pointer, check Chapter 5, Pointers.