How to create single session for all alljoyn application Any sample codes
For all AllJoyn applications to communicate over a single session the session type while binding a session should be multipoint. This can be enabled by passing in TRUE to the session opts that is passed in to the bind session port call. https://allseenalliance.org/docs/api/cpp/classajn_1_1_session_opts.html
An application would have to be made the host to which all other clients join. If you would like to make the host selection dynamic then you could go about it by using the GUID of the application. The application with the smallest/largest guid can be made the session host and all other applications can join the multipoint session hosted by it.
You could look at any sample code under samples. Assuming Java an example would be https://git.allseenalliance.org/cgit/core/alljoyn.git/tree/alljoyn_java/samples/android/basic/service/src/org/alljoyn/bus/samples/basicservice/Service.java
Here you would have to make
sessionOpts.isMultipoint = true;
Let me know if you have any questions
This thread is public, all members of ask.allseenalliance.org can read this page.
Asked: 2015-01-13 04:48:35 -0700
Seen: 38 times
Last updated: Jan 14 '15
© 2014 AllSeen Alliance, Inc. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. AllSeen and AllSeen Alliance are trademarks of the AllSeen Alliance, Inc.
Linux is a registered trademark of Linus Torvalds.