Open thw0rted opened 4 years ago
You can call unsubscribeUrl()
and pass in the URL you connected to. If they are separate for each socket, it only closes that one socket.
Thanks Ronny. Is that method described anywhere in the docs? I don't see it but maybe I'm looking in the wrong place.
To be honest, I am not sure. I was debugging an issue in our code where two sockets are used on the same page and discovered that call inside of the JS file. It seems to work and is public, so I hope its an official API...
Yes it is. The documentation needs to be updated....unfortunately I don't have time those days, but if you have the cycle, I can review and merge :-)
In the docs, the
unsubscribe
method is a top level function that, as far as I can tell, closes all known connections to all servers at once. I don't see any method onAtmosphereRequest
("subsocket" in the example) that would allow me to stop the subscription for a single topic. Is this not possible?