Alljoyn initiation flow

asked 2014-10-01 18:52:02 -0700

shlepsheed gravatar image

Until now i don't have problem when creating and initiating alljoyn to advertise and session. Based on the BasicServer, BasicClient and BasicChat sample for unity there some flow in there like

  1. Create new busattachment
  2. Create interface in the attachment
  3. Add member in the interface and activate
  4. Add listener
  5. Starting BusAttachment
  6. Register busobject
  7. Connecting the BusAttachment

Can we first create busattachment and then start then connect it (Do 1, 5, 7) then do the other? Register busobject and listener after connect()?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-10-01 20:54:46 -0700

You certainly can.

The first thing to be aware of is that once you're connected, messages are flowing so if your listeners are not in place before connecting you may miss something.

The second thing to be aware of is the ordering between when your BusObject is registered and when you request and advertise a name, or send an announce. The registration should happen before either of those two, otherwise remote nodes may attempt to send messages to your BusObject before it is in place to receive them.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-10-01 18:52:02 -0700

Seen: 99 times

Last updated: Oct 01 '14