-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PicoMQTT Server - on connect, on subscribe #41
Comments
You can subclass |
Thank you for the suggestion. I wish I knew C++ enough to make it. |
No, Here's how you can override these functions and add a custom logic when a client connects or subscribes to a topic:
You can override any other function marked |
Thank you very much for your help and patience. I think that closes the issue. |
@mlesniew would you mind giving this a try? the above seems not to work for me |
I stumbled on some c++ compiler issue - see updated example with devkit-c config from previous post
|
From the build log it looks like you're not using the latest PicoMQTT version. Can you check if this also happens with version 1.1.1? |
yes, sorry about that - switching to 1.1.1 adressed the first question build succeeds with the 8.4 toolchain brought by
second issue still remains
brings in the 13.2.0 toolchain which seems to be more picky:
not sure it's worth investigating, I'd just like to understand why |
that was too quick: with v1.1.1 and however the callbacks are NOT executed |
Try replacing With |
that did it, sorry for the snafu |
would you mind sketching how this would work in the multi_server example? the subclassing as suggested above doesnt work in this case, looks like advanced templatology is required if I try like so:
|
Sorry, I missed this question before. There reason it's not working is that To make
|
Hi!
How to know what are current subscriptions? Or, does Server notify about a new connection/subscription?
Thank you.
The text was updated successfully, but these errors were encountered: