1

How is it possible to ensure that Autobahn only creates a single connection?

Is it possible to either check for existing connections before calling connection.open, or perhaps kill all other connections on connection.onopen?

sscirrus
  • 55,407
  • 41
  • 135
  • 228

1 Answers1

-1

When using AutobahnJS (which I assume this relates to), you will generally not need to open multiple connections. If your application connects to a single WAMP server, then you can use the single connection for all WAMP actions while it persists, i.e. for all your subscriptions, publishes, registrations and calls.

gzost
  • 2,375
  • 1
  • 18
  • 25
  • 1
    This doesn't really answer my question - whether or not it's necessary, how can multiple connections be found? – sscirrus Feb 18 '17 at 01:44
  • 1
    There is no way to check for existing connections with the library, as the library only serves as a constructor for the connection objects. You will need to implement your own tracking for this. – gzost Feb 21 '17 at 15:35