uNetworkingAB
uNetworkingAB
Please add your changes to be merged if you want it fixed. Will close as this is a very unusual request.
I'm planning on fixing this. Did not know anyone wanted it fixed.
Fixed, will be part of next release
int us_protocol_support (int) Could be checked in listen and just print a different message as a hint
A simple **unsubscribed(topic)** callback would do, right? It gets called whenever you or the library unsubscribes from one topic.
**unsubscribed(ws, topic, remainingSubscribers)** That's a good callback - remainingSubscribers would be 0 when it is time to close Redis subscription Probably don't need one for subscribe since it's always explicit
No wait what you need is a callback for when a topic is removed due to no websockets subscribing to it anymore?
Both you and the referenced issue is pretty much about getting a callback whenever a topic lost all its subscribers. You just have small variations of the problem
To make it as generic as possible, it could be called topic(name, number) and be called whenever a topic changes number of subscribers. Then you can use 0 as destroy...
That's probably quite easy to do actually, and you could even do it as a completely separate layer above the callback layer. All you need is to wrap all the...