Adds OnConnect and OnDisconnect event hooks for monitoring connecting and disconnecting clients, and associated unit tests and examples.
server.Events.OnConnect
is called when a client successfully connects to the broker. The method receives the connect packet and the id and connection type for the client who connected.server.Events.OnDisconnect
is called when a client disconnects to the broker. If the client disconnected abnormally, the reason is indicated in the error parameter.
Checks:
- All unit tests passing.
- Paho interoperability tests passing.
What's Changed
Full Changelog: v1.0.4...v1.0.5