1

Now I'm developing chat using wamp-protocol, crossbar.io, autobahn.ws. We have rooms only for two clients. I need to define if other client is in room, if it in I publish new message in other case I make request to GCM. Every room has own uri like 'com.example.chat.'

That's why I need to get list of clients in specified uri 'com.example.chat.'.

Oleksandr Yarushevskyi
  • 2,789
  • 2
  • 17
  • 24

1 Answers1

2

This is possible via the meta-API - see http://crossbar.io/docs/Subscription-Meta-Events-and-Procedures/

So you'd retrieve the list of subscribers for the room topic by doing

session.call("wamp.subscription.list_subscribers", [23560753]).then(session.log, session.log)

where you'd use the subscription ID assigned to the topic by Crossbar.io.

gzost
  • 2,375
  • 1
  • 18
  • 25