Here is a quick look at the functions most commonly used from CP's RPC
library.
- public static Bool amIMaster()
- returns true if the client is master, false otherwise
- public static void sendApplSpecificMsgWithDist
(SFNode obj, string methodName, string argument, int distrMethod);
- sends a request to other clients to call a method locally
Parameters :
- SFNode obj : the shared object
- string methodName : the name of the method which will be invoked
locally on a client receiving this call
- string "argument" : set of parameters encoded as a String. The
receiver must decode this.
- int distrMethod : a flag which specifies the clients who get this
message
The common distribution methods are allClientsInAura,
allClientsInAuraExceptMe, responderOnly (which goes to the master),
allClients and allClientsExceptMe.
Back to Tutorial Seven main page