Open bradder555 opened 6 years ago
We use this PR in production. Hope it will be merged upstream one day.
Cool, I'm glad you find it useful, I've noticed there's a fair few downloads on NuGet.
We've since moved onto m2mqtt :).
I'd like to write a minimal implementation from scratch.
hi, is there any sample abot auto reconnect function?
How to use official packages for automatic reconnection
Auto reconnected has been added,
The workflow has been changed a little bit, but there are no breaking interface changes, thus the new version should work with existing code without any requirement for code changes.
Some new callbacks have been added for various events (i.e. reconnected)
The new interface is you have the client, you can add and remove topics from the client these are stored in a list on the client
When the client connects or reconnects, subscribeAll is called, this subscribes to all of the topics on the client.
subscribe and unsubscribe work exactly as they did before but now they keep the topics list up to date
the classes have been changed to a program, maybe this was a bad idea, but i found the program assisted the development process, the nice thing is, you can still use the program as a library so no harm there.
The default-sane configuration is chosen (i.e. autoreconnect by default) etc
Made some minor interface changes to make the app a little nicer in places