multi callees !!! is it possible ?

21 views
Skip to first unread message

Elyes ABEDA

unread,
May 26, 2016, 10:55:20 AM5/26/16
to CppWAMP
Hello everybody,

I'm using cppwamp library with bonefish router. I've tested it with one client (caller) and one service (callee) and it worked.
but I need to have several clients (callers and callee)
Is it possible to have several callees in the same session ?
If it is possible. How can I configure the router (bonefish) to support multi callees ?
Thanks.

Emile Cormier

unread,
May 26, 2016, 11:19:40 AM5/26/16
to CppWAMP
Elyes,

The way WAMP normally works is that if you have multiple clients calling the same RPC, they all get routed to that one callee who registered the RPC.

If you want to perform different actions depending on which caller made the call, then you'll have to use the Caller Identification feature of WAMP. In CppWAMP, this is supported by Rpc::withDiscloseMe() (see http://ecorm.github.io/cppwamp/doc/classwamp_1_1_rpc.html) and Invocation::caller() (see http://ecorm.github.io/cppwamp/doc/classwamp_1_1_invocation.html).

If you want to perform load balancing, then you'll have to use the Shared Registration feature of WAMP. I don't know whether or not this is supported by Bonefish. In CppWAMP you can set the REGISTER.Options.invoke|string option manually using Rpc::withOption(key, value) (see http://ecorm.github.io/cppwamp/doc/classwamp_1_1_options.html).

Hope this helps,
Emile
Reply all
Reply to author
Forward
0 new messages