I/O Independent MQTT Protocol Machine

async_mqtt supports an I/O independent (also known as Sans-I/O) MQTT protocol machine.

Classes

connection and rv_connection

Class connection (basic_connection)

The connection class represents the core protocol state machine.

connection

When public member functions are called, the internal state is updated. If caller action is required, the corresponding on_*() virtual function is invoked.

mapping

The following is a list of member functions:

Users should override the virtual functions and implement the required actions.

The following is a list of virtual member functions:

Class rv_connection

"rv" stands for "return value based". This class inherits from the connection class and overrides all the on_*() virtual functions. Its implementation converts the parameters into a event.

rv_connection

The following functions return a vector of events:

This class is used by the Boost.Asio binding’s basic_endpoint code.

Users can also inherit from the connection (basic_connection) class to implement their own custom behavior.

Examples

connection based

rc_connection based