deepstream.io-client-cpp
deepstream.io-client-cpp copied to clipboard
fix listening api
Listening is our way of allowing active publishers. What this means is a client is told about any subscription that matches a pattern, and has the option of accepting the request to provide the data. If it rejects another provider will be asked, until all providers are exhausted or one is found.
The API on the client is pretty simple. You register a pattern with a regular expression ( complete ), you get notified if a matching subscription is found ( complete ), you can accept ( done, but in a sync fashion rather than async ) and when the subscription is complete the listener is told by the server ( complete ).
This should be async incase the user decides to run an async function to figure out if it is willing to provide the subscription.