Skip to content

How to test for the client to be connected or not? #47

@SiebrenW

Description

@SiebrenW

I'm looking to use Boost::MQTT5 for my application, an embedded device communicating with other devices, but I kind of need to know (preferably also on a callback) whether the client has been connected/disconnected.

My current application uses mosquitto and asio, making the interface between the two a common pain point. My abstraction was easy to convert, but the missing part seems to be the on_disconnect/on_connect callbacks.

The application has different behaviour based on the connection (ie: stop sending more messages and create a safe state/recover)

So is there such a thing, or should I keep looking?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions