0

How to send sessionless signals in c++

asked 2014-11-13 12:05:35 -0700

pedja245 gravatar image

I'm trying to send sessionless signal in C++. From documentation and videos, it seems to me that the only difference in sending sessionless signals is the flag ALLJOYN_FLAG_SESSIONLESS which gets passed to the Signal() method. However, I can't manage to get it to work. I have added the sessionless signal to the interface, registered signal handler, but it doesn't work. I would appreciate if I could get concise information on steps that have to be made in order to send sessionless signals.

The reason I'm interested in sessionless signals, for now, is that I have no knowledge of implemented mechanisms for connecting to random Alljoyn app without knowing it's SessionPort in advance. Sample codes contain hard-coded SessionPort numbers, so I'm also interested whether or not there are some recommended ways of doing this. As far as I have understood the Alljoyn Framework is designed to be able to do that, but I haven't found out a way to do this. So, basically I was trying to send SessionPort information using sessionless signals. At first I thought that the About service is used for that, but there aren't any fields representing SessionPort, so I'm stuck.

Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-11-13 19:36:30 -0700

congngale gravatar image

Hi pedja245,

There are 2 things that you need to have if you want to send a sessionless signal on alljoyn. Firstly, use ALLJOYN_FLAG_SESSIONLESS flag when you send a signal.

Secondly, You have to update your rule in admatch function with "sessionless=t" to receive a sessionless signal. For example, "type='signal',interface='com.test.app',member='your.interface.member',sessionless='t'"

edit flag offensive delete publish link more

Comments

Thank you for your reply. I finally made it to work. However, the second part of the question still remains unanswered. Can you tell me how can I join a session with an app whose session port is unknown to me?

pedja245 ( 2014-11-14 11:03:22 -0700 )edit

@pedja245, You can send a sessionless signal contain your application's information includes session port , and when other applications receive a sessionless signal then connect back to the application. It is the same mechanisms with About Service.

congngale ( 2014-11-15 00:43:51 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-11-13 12:05:35 -0700

Seen: 175 times

Last updated: Nov 13 '14