KMQTT Broker: Any way to know if the broker has been started or stopped adter broker.listen() or broker.stop() gets executed? Something like a listener ??
Closed this issue · 4 comments
nishankhadka09 commented
Would it be possible to add a Broker Started/Stopped listener?
davidepianca98 commented
Hello, thanks for the suggestion. I will add some way of checking if the broker is running as soon as I can.
But shouldn't you get an exception if the broker has stopped because of an error? What is your specific use case?
nishankhadka09 commented
The use case is for the KMQTT broker itself - I want to show message like "Broker started/ Broker stopped" messages in my standalone broker app.
I can do a toast after successful broker.listen()
and broker.stop()
. But I think I still need to listen to port, if it gets closed abruptly by system, and update the UI for the broker accordingly.
davidepianca98 commented
Thanks a lot, I will add it whenever I have some time!
davidepianca98 commented
Added in 225f2a0