Avoiding duplicate Autobahn connections

195 views Asked by At

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?

1

There are 1 answers

2
gzost On

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.