mqtt_cpp
Public Types | Public Member Functions | List of all members
MQTT_NS::callable_overlay< Impl > Struct Template Referencefinal

#include <callable_overlay.hpp>

Inheritance diagram for MQTT_NS::callable_overlay< Impl >:
Inheritance graph
[legend]
Collaboration diagram for MQTT_NS::callable_overlay< Impl >:
Collaboration graph
[legend]

Public Types

using base = Impl
 
using packet_id_t = typename base::packet_id_t
 
using pingreq_handler = std::function< bool()>
 Pingreq handler See http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718086
3.13 PINGREQ – PING request. More...
 
using pingresp_handler = std::function< bool()>
 Pingresp handler See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901200
3.13 PINGRESP – PING response. More...
 
using connect_handler = std::function< bool(buffer client_id, optional< buffer > user_name, optional< buffer > password, optional< will > will, bool clean_session, std::uint16_t keep_alive)>
 Connect handler. More...
 
using connack_handler = std::function< bool(bool session_present, connect_return_code return_code)>
 Connack handler. More...
 
using publish_handler = std::function< bool(optional< packet_id_t > packet_id, publish_options pubopts, buffer topic_name, buffer contents)>
 Publish handler. More...
 
using puback_handler = std::function< bool(packet_id_t packet_id)>
 Puback handler. More...
 
using pubrec_handler = std::function< bool(packet_id_t packet_id)>
 Pubrec handler. More...
 
using pubrel_handler = std::function< bool(packet_id_t packet_id)>
 Pubrel handler. More...
 
using pubcomp_handler = std::function< bool(packet_id_t packet_id)>
 Pubcomp handler. More...
 
using subscribe_handler = std::function< bool(packet_id_t packet_id, std::vector< subscribe_entry > entries)>
 Subscribe handler. More...
 
using suback_handler = std::function< bool(packet_id_t packet_id, std::vector< suback_return_code > qoss)>
 Suback handler. More...
 
using unsubscribe_handler = std::function< bool(packet_id_t packet_id, std::vector< unsubscribe_entry > entries)>
 Unsubscribe handler. More...
 
using unsuback_handler = std::function< bool(packet_id_t)>
 Unsuback handler. More...
 
using disconnect_handler = std::function< void()>
 Disconnect handler See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc384800463
3.14 DISCONNECT – Disconnect notification. More...
 
using v5_connect_handler = std::function< bool(buffer client_id, optional< buffer > user_name, optional< buffer > password, optional< will > will, bool clean_start, std::uint16_t keep_alive, v5::properties props) >
 Connect handler. More...
 
using v5_connack_handler = std::function< bool(bool session_present, v5::connect_reason_code reason_code, v5::properties props) >
 Connack handler. More...
 
using v5_publish_handler = std::function< bool(optional< packet_id_t > packet_id, publish_options pubopts, buffer topic_name, buffer contents, v5::properties props) >
 Publish handler. More...
 
using v5_puback_handler = std::function< bool(packet_id_t packet_id, v5::puback_reason_code reason_code, v5::properties props) >
 Puback handler. More...
 
using v5_pubrec_handler = std::function< bool(packet_id_t packet_id, v5::pubrec_reason_code reason_code, v5::properties props) >
 Pubrec handler. More...
 
using v5_pubrel_handler = std::function< bool(packet_id_t packet_id, v5::pubrel_reason_code reason_code, v5::properties props) >
 Pubrel handler. More...
 
using v5_pubcomp_handler = std::function< bool(packet_id_t packet_id, v5::pubcomp_reason_code reason_code, v5::properties props) >
 Pubcomp handler. More...
 
using v5_subscribe_handler = std::function< bool(packet_id_t packet_id, std::vector< subscribe_entry > entries, v5::properties props) >
 Subscribe handler. More...
 
using v5_suback_handler = std::function< bool(packet_id_t packet_id, std::vector< v5::suback_reason_code > reasons, v5::properties props) >
 Suback handler. More...
 
using v5_unsubscribe_handler = std::function< bool(packet_id_t packet_id, std::vector< unsubscribe_entry > entries, v5::properties props) >
 Unsubscribe handler. More...
 
using v5_unsuback_handler = std::function< bool(packet_id_t, std::vector< v5::unsuback_reason_code > reasons, v5::properties props) >
 Unsuback handler. More...
 
using v5_disconnect_handler = std::function< void(v5::disconnect_reason_code reason_code, v5::properties props) >
 Disconnect handler See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901205
3.14 DISCONNECT – Disconnect notification. More...
 
using v5_auth_handler = std::function< bool(v5::auth_reason_code reason_code, v5::properties props) >
 Auth handler See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901217
3.15 AUTH – Authentication exchange. More...
 
using close_handler = std::function< void()>
 Close handler. More...
 
using error_handler = std::function< void(error_code ec)>
 Error handler. More...
 
using pub_res_sent_handler = std::function< void(packet_id_t packet_id)>
 Publish response sent handler This function is called just after puback sent on QoS1, or pubcomp sent on QoS2. More...
 
using serialize_publish_message_handler = std::function< void(basic_publish_message< sizeof(packet_id_t)> msg)>
 Serialize publish handler You can serialize the publish message. To restore the message, use restore_serialized_message(). More...
 
using serialize_v5_publish_message_handler = std::function< void(v5::basic_publish_message< sizeof(packet_id_t)> msg)>
 Serialize publish handler You can serialize the publish message. To restore the message, use restore_serialized_message(). More...
 
using serialize_publish_handler = std::function< void(packet_id_t packet_id, char const *data, std::size_t size)>
 Serialize publish handler You can serialize the publish message. To restore the message, use restore_serialized_message(). More...
 
using serialize_pubrel_message_handler = std::function< void(basic_pubrel_message< sizeof(packet_id_t)> msg)>
 Serialize pubrel handler You can serialize the pubrel message. If your storage has already had the publish message that has the same packet_id, then you need to replace the publish message to pubrel message. To restore the message, use restore_serialized_message(). More...
 
using serialize_v5_pubrel_message_handler = std::function< void(v5::basic_pubrel_message< sizeof(packet_id_t)> msg)>
 Serialize pubrel handler You can serialize the pubrel message. If your storage has already had the publish message that has the same packet_id, then you need to replace the publish message to pubrel message. To restore the message, use restore_serialized_message(). More...
 
using serialize_pubrel_handler = std::function< void(packet_id_t packet_id, char const *data, std::size_t size)>
 Serialize pubrel handler You can serialize the pubrel message. If your storage has already had the publish message that has the same packet_id, then you need to replace the publish message to pubrel message. To restore the message, use restore_serialized_message(). More...
 
using serialize_remove_handler = std::function< void(packet_id_t packet_id)>
 Remove serialized message. More...
 
using pre_send_handler = std::function< void()>
 Pre-send handler This handler is called when any mqtt control packet is decided to send. More...
 
using is_valid_length_handler = std::function< bool(control_packet_type packet_type, std::size_t remaining_length)>
 is valid length handler This handler is called when remaining length is received. More...
 
using mqtt_message_processed_handler = std::function< void(any session_life_keeper)>
 next read handler This handler is called when the current mqtt message has been processed. More...
 

Public Member Functions

template<typename ... Args>
 callable_overlay (Args &&... args)
 
 ~callable_overlay ()=default
 
 callable_overlay (callable_overlay &&)=default
 
 callable_overlay (callable_overlay const &)=default
 
callable_overlayoperator= (callable_overlay &&)=default
 
callable_overlayoperator= (callable_overlay const &)=default
 
MQTT_ALWAYS_INLINE bool on_pingreq () noexcept override final
 Pingreq handler See http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718086
3.13 PINGREQ – PING request. More...
 
MQTT_ALWAYS_INLINE bool on_pingresp () noexcept override final
 Pingresp handler See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901200
3.13 PINGRESP – PING response. More...
 
MQTT_ALWAYS_INLINE bool on_connect (buffer client_id, optional< buffer > user_name, optional< buffer > password, optional< will > will, bool clean_session, std::uint16_t keep_alive) noexcept override final
 Connect handler. More...
 
MQTT_ALWAYS_INLINE bool on_connack (bool session_present, connect_return_code return_code) noexcept override final
 Connack handler. More...
 
MQTT_ALWAYS_INLINE bool on_publish (optional< packet_id_t > packet_id, publish_options pubopts, buffer topic_name, buffer contents) noexcept override final
 Publish handler. More...
 
MQTT_ALWAYS_INLINE bool on_puback (packet_id_t packet_id) noexcept override final
 Puback handler. More...
 
MQTT_ALWAYS_INLINE bool on_pubrec (packet_id_t packet_id) noexcept override final
 Pubrec handler. More...
 
MQTT_ALWAYS_INLINE bool on_pubrel (packet_id_t packet_id) noexcept override final
 Pubrel handler. More...
 
MQTT_ALWAYS_INLINE bool on_pubcomp (packet_id_t packet_id) noexcept override final
 Pubcomp handler. More...
 
MQTT_ALWAYS_INLINE bool on_subscribe (packet_id_t packet_id, std::vector< subscribe_entry > entries) noexcept override final
 Subscribe handler. More...
 
MQTT_ALWAYS_INLINE bool on_suback (packet_id_t packet_id, std::vector< suback_return_code > reasons) noexcept override final
 Suback handler. More...
 
MQTT_ALWAYS_INLINE bool on_unsubscribe (packet_id_t packet_id, std::vector< unsubscribe_entry > entries) noexcept override final
 Unsubscribe handler. More...
 
MQTT_ALWAYS_INLINE bool on_unsuback (packet_id_t packet_id) noexcept override final
 Unsuback handler. More...
 
MQTT_ALWAYS_INLINE void on_disconnect () noexcept override final
 Disconnect handler See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc384800463
3.14 DISCONNECT – Disconnect notification. More...
 
MQTT_ALWAYS_INLINE bool on_v5_connect (buffer client_id, optional< buffer > user_name, optional< buffer > password, optional< will > will, bool clean_start, std::uint16_t keep_alive, v5::properties props) noexcept override final
 Connect handler. More...
 
MQTT_ALWAYS_INLINE bool on_v5_connack (bool session_present, v5::connect_reason_code reason_code, v5::properties props) noexcept override final
 Connack handler. More...
 
MQTT_ALWAYS_INLINE bool on_v5_publish (optional< packet_id_t > packet_id, publish_options pubopts, buffer topic_name, buffer contents, v5::properties props) noexcept override final
 Publish handler. More...
 
MQTT_ALWAYS_INLINE bool on_v5_puback (packet_id_t packet_id, v5::puback_reason_code reason_code, v5::properties props) noexcept override final
 Puback handler. More...
 
MQTT_ALWAYS_INLINE bool on_v5_pubrec (packet_id_t packet_id, v5::pubrec_reason_code reason_code, v5::properties props) noexcept override final
 Pubrec handler. More...
 
MQTT_ALWAYS_INLINE bool on_v5_pubrel (packet_id_t packet_id, v5::pubrel_reason_code reason_code, v5::properties props) noexcept override final
 Pubrel handler. More...
 
MQTT_ALWAYS_INLINE bool on_v5_pubcomp (packet_id_t packet_id, v5::pubcomp_reason_code reason_code, v5::properties props) noexcept override final
 Pubcomp handler. More...
 
MQTT_ALWAYS_INLINE bool on_v5_subscribe (packet_id_t packet_id, std::vector< subscribe_entry > entries, v5::properties props) noexcept override final
 Subscribe handler. More...
 
MQTT_ALWAYS_INLINE bool on_v5_suback (packet_id_t packet_id, std::vector< v5::suback_reason_code > reasons, v5::properties props) noexcept override final
 Suback handler. More...
 
MQTT_ALWAYS_INLINE bool on_v5_unsubscribe (packet_id_t packet_id, std::vector< unsubscribe_entry > entries, v5::properties props) noexcept override final
 Unsubscribe handler. More...
 
MQTT_ALWAYS_INLINE bool on_v5_unsuback (packet_id_t packet_id, std::vector< v5::unsuback_reason_code > reasons, v5::properties props) noexcept override final
 Unsuback handler. More...
 
MQTT_ALWAYS_INLINE void on_v5_disconnect (v5::disconnect_reason_code reason_code, v5::properties props) noexcept override final
 Disconnect handler See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901205
3.14 DISCONNECT – Disconnect notification. More...
 
MQTT_ALWAYS_INLINE bool on_v5_auth (v5::auth_reason_code reason_code, v5::properties props) noexcept override final
 Auth handler See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901217
3.15 AUTH – Authentication exchange. More...
 
MQTT_ALWAYS_INLINE void on_close () noexcept override final
 Close handler. More...
 
MQTT_ALWAYS_INLINE void on_error (error_code ec) noexcept override final
 Error handler. More...
 
MQTT_ALWAYS_INLINE void on_pub_res_sent (packet_id_t packet_id) noexcept override final
 Publish response sent handler This function is called just after puback sent on QoS1, or pubcomp sent on QoS2. More...
 
MQTT_ALWAYS_INLINE void on_serialize_publish_message (basic_publish_message< sizeof(packet_id_t)> msg) noexcept override final
 Serialize publish handler You can serialize the publish message. To restore the message, use restore_serialized_message(). More...
 
MQTT_ALWAYS_INLINE void on_serialize_v5_publish_message (v5::basic_publish_message< sizeof(packet_id_t)> msg) noexcept override final
 Serialize publish handler You can serialize the publish message. To restore the message, use restore_serialized_message(). More...
 
MQTT_ALWAYS_INLINE void on_serialize_pubrel_message (basic_pubrel_message< sizeof(packet_id_t)> msg) noexcept override final
 Serialize pubrel handler You can serialize the pubrel message. If your storage has already had the publish message that has the same packet_id, then you need to replace the publish message to pubrel message. To restore the message, use restore_serialized_message(). More...
 
MQTT_ALWAYS_INLINE void on_serialize_v5_pubrel_message (v5::basic_pubrel_message< sizeof(packet_id_t)> msg) noexcept override final
 Serialize pubrel handler You can serialize the pubrel message. If your storage has already had the publish message that has the same packet_id, then you need to replace the publish message to pubrel message. To restore the message, use restore_serialized_message(). More...
 
MQTT_ALWAYS_INLINE void on_serialize_remove (packet_id_t packet_id) noexcept override final
 Remove serialized message. More...
 
MQTT_ALWAYS_INLINE void on_pre_send () noexcept override final
 Pre-send handler This handler is called when any mqtt control packet is decided to send. More...
 
MQTT_ALWAYS_INLINE bool check_is_valid_length (control_packet_type packet_type, std::size_t remaining_length) noexcept override final
 is valid length handler This handler is called when remaining length is received. More...
 
MQTT_ALWAYS_INLINE void on_mqtt_message_processed (any session_life_keeper) noexcept override final
 next read handler This handler is called when the current mqtt message has been processed. This calls base::on_mqtt_message_processed() only if mqtt_message_processed handler is not set. More...
 
void set_pingreq_handler (pingreq_handler h=pingreq_handler())
 Set pingreq handler. More...
 
void set_pingresp_handler (pingresp_handler h=pingresp_handler())
 Set pingresp handler. More...
 
pingreq_handler const & get_pingreq_handler () const
 Get pingreq handler. More...
 
pingresp_handler const & get_pingresp_handler () const
 Get pingresp handler. More...
 
void set_connect_handler (connect_handler h=connect_handler())
 Set connect handler. More...
 
void set_connack_handler (connack_handler h=connack_handler())
 Set connack handler. More...
 
void set_publish_handler (publish_handler h=publish_handler())
 Set publish handler. More...
 
void set_puback_handler (puback_handler h=puback_handler())
 Set puback handler. More...
 
void set_pubrec_handler (pubrec_handler h=pubrec_handler())
 Set pubrec handler. More...
 
void set_pubrel_handler (pubrel_handler h=pubrel_handler())
 Set pubrel handler. More...
 
void set_pubcomp_handler (pubcomp_handler h=pubcomp_handler())
 Set pubcomp handler. More...
 
void set_subscribe_handler (subscribe_handler h=subscribe_handler())
 Set subscribe handler. More...
 
void set_suback_handler (suback_handler h=suback_handler())
 Set suback handler. More...
 
void set_unsubscribe_handler (unsubscribe_handler h=unsubscribe_handler())
 Set unsubscribe handler. More...
 
void set_unsuback_handler (unsuback_handler h=unsuback_handler())
 Set unsuback handler. More...
 
void set_disconnect_handler (disconnect_handler h=disconnect_handler())
 Set disconnect handler. More...
 
connect_handler const & get_connect_handler () const
 Get connect handler. More...
 
connack_handler const & get_connack_handler () const
 Get connack handler. More...
 
publish_handler const & get_publish_handler () const
 Set publish handler. More...
 
puback_handler const & get_puback_handler () const
 Get puback handler. More...
 
pubrec_handler const & get_pubrec_handler () const
 Get pubrec handler. More...
 
pubrel_handler const & get_pubrel_handler () const
 Get pubrel handler. More...
 
pubcomp_handler const & get_pubcomp_handler () const
 Get pubcomp handler. More...
 
subscribe_handler const & get_subscribe_handler () const
 Get subscribe handler. More...
 
suback_handler const & get_suback_handler () const
 Get suback handler. More...
 
unsubscribe_handler const & get_unsubscribe_handler () const
 Get unsubscribe handler. More...
 
unsuback_handler const & get_unsuback_handler () const
 Get unsuback handler. More...
 
disconnect_handler const & get_disconnect_handler () const
 Get disconnect handler. More...
 
void set_v5_connect_handler (v5_connect_handler h=v5_connect_handler())
 Set connect handler. More...
 
void set_v5_connack_handler (v5_connack_handler h=v5_connack_handler())
 Set connack handler. More...
 
void set_v5_publish_handler (v5_publish_handler h=v5_publish_handler())
 Set publish handler. More...
 
void set_v5_puback_handler (v5_puback_handler h=v5_puback_handler())
 Set puback handler. More...
 
void set_v5_pubrec_handler (v5_pubrec_handler h=v5_pubrec_handler())
 Set pubrec handler. More...
 
void set_v5_pubrel_handler (v5_pubrel_handler h=v5_pubrel_handler())
 Set pubrel handler. More...
 
void set_v5_pubcomp_handler (v5_pubcomp_handler h=v5_pubcomp_handler())
 Set pubcomp handler. More...
 
void set_v5_subscribe_handler (v5_subscribe_handler h=v5_subscribe_handler())
 Set subscribe handler. More...
 
void set_v5_suback_handler (v5_suback_handler h=v5_suback_handler())
 Set suback handler. More...
 
void set_v5_unsubscribe_handler (v5_unsubscribe_handler h=v5_unsubscribe_handler())
 Set unsubscribe handler. More...
 
void set_v5_unsuback_handler (v5_unsuback_handler h=v5_unsuback_handler())
 Set unsuback handler. More...
 
void set_v5_disconnect_handler (v5_disconnect_handler h=v5_disconnect_handler())
 Set disconnect handler. More...
 
void set_v5_auth_handler (v5_auth_handler h=v5_auth_handler())
 Set auth handler. More...
 
v5_connect_handler const & get_v5_connect_handler () const
 Get connect handler. More...
 
v5_connack_handler const & get_v5_connack_handler () const
 Get connack handler. More...
 
v5_publish_handler const & get_v5_publish_handler () const
 Set publish handler. More...
 
v5_puback_handler const & get_v5_puback_handler () const
 Get puback handler. More...
 
v5_pubrec_handler const & get_v5__handler () const
 Get pubrec handler. More...
 
v5_pubrel_handler const & get_v5_pubrel_handler () const
 Get pubrel handler. More...
 
v5_pubcomp_handler const & get_v5_pubcomp_handler () const
 Get pubcomp handler. More...
 
v5_subscribe_handler const & get_v5_subscribe_handler () const
 Get subscribe handler. More...
 
v5_suback_handler const & get_v5_suback_handler () const
 Get suback handler. More...
 
v5_unsubscribe_handler const & get_v5_unsubscribe_handler () const
 Get unsubscribe handler. More...
 
v5_unsuback_handler const & get_v5_unsuback_handler () const
 Get unsuback handler. More...
 
v5_disconnect_handler const & get_v5_disconnect_handler () const
 Get disconnect handler. More...
 
v5_auth_handler const & get_v5_auth_handler () const
 Get auth handler. More...
 
void set_pub_res_sent_handler (pub_res_sent_handler h=pub_res_sent_handler())
 Set pubcomp handler. More...
 
void set_serialize_handlers (serialize_publish_message_handler h_publish, serialize_pubrel_message_handler h_pubrel, serialize_remove_handler h_remove)
 Set serialize handlers. More...
 
void set_v5_serialize_handlers (serialize_v5_publish_message_handler h_publish, serialize_v5_pubrel_message_handler h_pubrel, serialize_remove_handler h_remove)
 Set serialize handlers. More...
 
void set_serialize_handlers (serialize_publish_handler h_publish, serialize_pubrel_handler h_pubrel, serialize_remove_handler h_remove)
 Set serialize handlers. More...
 
void set_v5_serialize_handlers (serialize_publish_handler h_publish, serialize_pubrel_handler h_pubrel, serialize_remove_handler h_remove)
 Set serialize handlers. More...
 
void set_serialize_handlers ()
 Clear serialize handlers. More...
 
void set_pre_send_handler (pre_send_handler h=pre_send_handler())
 Set pre-send handler. More...
 
void set_is_valid_length_handler (is_valid_length_handler h=is_valid_length_handler())
 Set check length handler. More...
 
pub_res_sent_handler const & get_pub_res_sent_handler () const
 Get publish response sent handler. More...
 
serialize_publish_message_handler const & get_serialize_publish_message_handler () const
 Get serialize publish handler. More...
 
serialize_pubrel_message_handler const & get_serialize_pubrel_message_handler () const
 Get serialize pubrel handler. More...
 
serialize_v5_publish_message_handler const & get_serialize_v5_publish_message_handler () const
 Get serialize publish handler. More...
 
serialize_v5_pubrel_message_handler const & get_serialize_v5_pubrel_message_handler () const
 Get serialize pubrel handler. More...
 
serialize_remove_handler const & get_serialize_remove_handler () const
 Get serialize remove handler. More...
 
pre_send_handler const & get_pre_send_handler () const
 Get pre-send handler. More...
 
is_valid_length_handler const & get_is_valid_length_handler () const
 Get check length handler. More...
 
void set_mqtt_message_processed_handler (mqtt_message_processed_handler h=mqtt_message_processed_handler())
 Set custom mqtt_message_processed_handler. The default setting is calling async_read_control_packet_type(). (See endpoint() constructor). The typical usecase of this function is delaying the next message reading timing. In order to do that 1) store func parameter of the mqtt_message_processed_handler. 2) call async_read_next_message with the stored func if you are ready to read the next mqtt message. More...
 
mqtt_message_processed_handler get_mqtt_message_processed_handler () const
 Get mqtt_message_processed_handler. More...
 
void set_close_handler (close_handler h=close_handler())
 Set close handler. More...
 
void set_error_handler (error_handler h=error_handler())
 Set error handler. More...
 
close_handler get_close_handler () const
 Get close handler. More...
 
error_handler get_error_handler () const
 Get error handler. More...
 

Member Typedef Documentation

◆ base

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::base = Impl

◆ close_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::close_handler = std::function<void()>

Close handler.

This handler is called if the client called disconnect() and the server closed the socket cleanly. If the socket is closed by other reasons, error_handler is called.

◆ connack_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::connack_handler = std::function<bool(bool session_present, connect_return_code return_code)>

Connack handler.

Parameters
session_presentSession present flag.
See http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718036
3.2.2.2 Session Present
return_codeconnect_return_code
See http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718036
3.2.2.3 Connect Return code
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ connect_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::connect_handler = std::function< bool(buffer client_id, optional<buffer> user_name, optional<buffer> password, optional<will> will, bool clean_session, std::uint16_t keep_alive)>

Connect handler.

Parameters
client_idClient Identifier.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349245
3.1.3.1 Client Identifier
user_nameUser Name.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349245
3.1.3.4 User Name
passwordPassword.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349246
3.1.3.5 Password
willWill. It contains retain, QoS, topic, and message.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349232
3.1.2.5 Will Flag
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349233
3.1.2.6 Will QoS
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349234
3.1.2.7 Will Retain
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349243
3.1.3.2 Will Topic
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349244
3.1.3.3 Will Message
clean_sessionClean Session
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349231
3.1.2.4 Clean Session
keep_aliveKeep Alive
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349237
3.1.2.10 Keep Alive
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ disconnect_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::disconnect_handler = std::function<void()>

Disconnect handler See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc384800463
3.14 DISCONNECT – Disconnect notification.

◆ error_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::error_handler = std::function<void(error_code ec)>

Error handler.

This handler is called if the socket is closed without client's disconnect() call.

Parameters
ecerror code

◆ is_valid_length_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::is_valid_length_handler = std::function<bool(control_packet_type packet_type, std::size_t remaining_length)>

is valid length handler This handler is called when remaining length is received.

Parameters
control_packet_typecontrol_packet_type that has variable length
remaininglength
Returns
true if check is success, otherwise false

◆ mqtt_message_processed_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::mqtt_message_processed_handler = std::function<void(any session_life_keeper)>

next read handler This handler is called when the current mqtt message has been processed.

Parameters
funcA callback function that is called when async operation will finish.

◆ packet_id_t

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::packet_id_t = typename base::packet_id_t

◆ pingreq_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::pingreq_handler = std::function<bool()>

Pingreq handler See http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718086
3.13 PINGREQ – PING request.

Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ pingresp_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::pingresp_handler = std::function<bool()>

Pingresp handler See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901200
3.13 PINGRESP – PING response.

Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ pre_send_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::pre_send_handler = std::function<void()>

Pre-send handler This handler is called when any mqtt control packet is decided to send.

◆ pub_res_sent_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::pub_res_sent_handler = std::function<void(packet_id_t packet_id)>

Publish response sent handler This function is called just after puback sent on QoS1, or pubcomp sent on QoS2.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901026
2.2.1 Packet Identifier

◆ puback_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::puback_handler = std::function<bool(packet_id_t packet_id)>

Puback handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc398718045
3.4.2 Variable header
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ pubcomp_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::pubcomp_handler = std::function<bool(packet_id_t packet_id)>

Pubcomp handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc398718060
3.7.2 Variable header
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ publish_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::publish_handler = std::function<bool(optional<packet_id_t> packet_id, publish_options pubopts, buffer topic_name, buffer contents)>

Publish handler.

Parameters
fixed_headerSee https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc398718038
3.3.1 Fixed header
You can check the fixed header using publish functions.
packet_idpacket identifier
If received publish's QoS is 0, packet_id is nullopt.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc398718039
3.3.2 Variable header
topic_nameTopic name
contentsPublished contents
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ pubrec_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::pubrec_handler = std::function<bool(packet_id_t packet_id)>

Pubrec handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc398718050
3.5.2 Variable header
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ pubrel_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::pubrel_handler = std::function<bool(packet_id_t packet_id)>

Pubrel handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349791
3.6.2 Variable header
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ serialize_publish_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::serialize_publish_handler = std::function<void(packet_id_t packet_id, char const* data, std::size_t size)>

Serialize publish handler You can serialize the publish message. To restore the message, use restore_serialized_message().

Parameters
packet_idpacket identifier of the serializing message
datapointer to the serializing message
sizesize of the serializing message

◆ serialize_publish_message_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::serialize_publish_message_handler = std::function<void(basic_publish_message<sizeof(packet_id_t)> msg)>

Serialize publish handler You can serialize the publish message. To restore the message, use restore_serialized_message().

Parameters
msgpublish message

◆ serialize_pubrel_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::serialize_pubrel_handler = std::function<void(packet_id_t packet_id, char const* data, std::size_t size)>

Serialize pubrel handler You can serialize the pubrel message. If your storage has already had the publish message that has the same packet_id, then you need to replace the publish message to pubrel message. To restore the message, use restore_serialized_message().

Parameters
packet_idpacket identifier of the serializing message
datapointer to the serializing message
sizesize of the serializing message

◆ serialize_pubrel_message_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::serialize_pubrel_message_handler = std::function<void(basic_pubrel_message<sizeof(packet_id_t)> msg)>

Serialize pubrel handler You can serialize the pubrel message. If your storage has already had the publish message that has the same packet_id, then you need to replace the publish message to pubrel message. To restore the message, use restore_serialized_message().

Parameters
msgpubrel message

◆ serialize_remove_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::serialize_remove_handler = std::function<void(packet_id_t packet_id)>

Remove serialized message.

Parameters
packet_idpacket identifier of the removing message

◆ serialize_v5_publish_message_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::serialize_v5_publish_message_handler = std::function<void(v5::basic_publish_message<sizeof(packet_id_t)> msg)>

Serialize publish handler You can serialize the publish message. To restore the message, use restore_serialized_message().

Parameters
msgv5::publish message

◆ serialize_v5_pubrel_message_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::serialize_v5_pubrel_message_handler = std::function<void(v5::basic_pubrel_message<sizeof(packet_id_t)> msg)>

Serialize pubrel handler You can serialize the pubrel message. If your storage has already had the publish message that has the same packet_id, then you need to replace the publish message to pubrel message. To restore the message, use restore_serialized_message().

Parameters
msgpubrel message

◆ suback_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::suback_handler = std::function<bool(packet_id_t packet_id, std::vector<suback_return_code> qoss)>

Suback handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc398718070
3.9.2 Variable header
qossCollection of QoS that is corresponding to subscribed topic order.
If subscription is failure, the value is nullopt.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc398718071
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ subscribe_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::subscribe_handler = std::function<bool(packet_id_t packet_id, std::vector<subscribe_entry> entries)>

Subscribe handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349801
3.8.2 Variable header
entriesCollection of Share Name, Topic Filter, and QoS.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349802
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ unsuback_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::unsuback_handler = std::function<bool(packet_id_t)>

Unsuback handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc398718045
3.11.2 Variable header
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ unsubscribe_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::unsubscribe_handler = std::function<bool(packet_id_t packet_id, std::vector<unsubscribe_entry> entries)>

Unsubscribe handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349810
3.10.2 Variable header
entriesCollection of Share Name and Topic Filter
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc384800448
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ v5_auth_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::v5_auth_handler = std::function< bool(v5::auth_reason_code reason_code, v5::properties props) >

Auth handler See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901217
3.15 AUTH – Authentication exchange.

Parameters
reason_codeAUTH Reason Code
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901220
3.15.2.1 Authenticate Reason Code
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901221
3.15.2.2 AUTH Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ v5_connack_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::v5_connack_handler = std::function< bool(bool session_present, v5::connect_reason_code reason_code, v5::properties props) >

Connack handler.

Parameters
session_presentSession present flag.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901078
3.2.2.1.1 Session Present
reason_codeConnect Reason Code
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901079
3.2.2.2 Connect Reason code
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901080
3.2.2.3 CONNACK Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ v5_connect_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::v5_connect_handler = std::function< bool(buffer client_id, optional<buffer> user_name, optional<buffer> password, optional<will> will, bool clean_start, std::uint16_t keep_alive, v5::properties props) >

Connect handler.

Parameters
client_idClient Identifier.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901059
3.1.3.1 Client Identifier
user_nameUser Name.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901071
3.1.3.4 User Name
passwordPassword.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901072
3.1.3.5 Password
willWill. It contains retain, QoS, propertied, topic, and message.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901040
3.1.2.5 Will Flag
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901041
3.1.2.6 Will QoS
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901042
3.1.2.7 Will Retain
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901060
3.1.3.2 Will Properties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901069
3.1.3.3 Will Topic
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901070
3.1.3.3 Will Payload
clean_startClean Start
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901039
3.1.2.4 Clean Session
keep_aliveKeep Alive
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901045
3.1.2.10 Keep Alive
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901046
3.1.2.11 CONNECT Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ v5_disconnect_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::v5_disconnect_handler = std::function< void(v5::disconnect_reason_code reason_code, v5::properties props) >

Disconnect handler See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901205
3.14 DISCONNECT – Disconnect notification.

Parameters
reason_codeDISCONNECT Reason Code
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901208
3.14.2.1 Disconnect Reason Code
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901209
3.14.2.2 DISCONNECT Properties

◆ v5_puback_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::v5_puback_handler = std::function< bool(packet_id_t packet_id, v5::puback_reason_code reason_code, v5::properties props) >

Puback handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901123
3.4.2 Variable header
reason_codePUBACK Reason Code
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901124
3.4.2.1 PUBACK Reason Code
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901125
3.4.2.2 PUBACK Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ v5_pubcomp_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::v5_pubcomp_handler = std::function< bool(packet_id_t packet_id, v5::pubcomp_reason_code reason_code, v5::properties props) >

Pubcomp handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901153
3.7.2 Variable header
reason_codePUBCOMP Reason Code
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901154
3.7.2.1 PUBCOMP Reason Code
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901155
3.7.2.2 PUBCOMP Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ v5_publish_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::v5_publish_handler = std::function< bool(optional<packet_id_t> packet_id, publish_options pubopts, buffer topic_name, buffer contents, v5::properties props) >

Publish handler.

Parameters
packet_idpacket identifier
If received publish's QoS is 0, packet_id is nullopt.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901108
3.3.2.2 Packet Identifier
fixed_headerSee https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901101
3.3.1 Fixed header
You can check the fixed header using publish functions.
topic_nameTopic name
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901107
3.3.2.1 Topic Name
contentsPublish Payload
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901119
3.3.3 PUBLISH Payload
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901109
3.3.2.3 PUBLISH Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ v5_pubrec_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::v5_pubrec_handler = std::function< bool(packet_id_t packet_id, v5::pubrec_reason_code reason_code, v5::properties props) >

Pubrec handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901133
3.5.2 Variable header
reason_codePUBREC Reason Code
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901134
3.5.2.1 PUBREC Reason Code
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901135
3.5.2.2 PUBREC Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ v5_pubrel_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::v5_pubrel_handler = std::function< bool(packet_id_t packet_id, v5::pubrel_reason_code reason_code, v5::properties props) >

Pubrel handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901143
3.6.2 Variable header
reason_codePUBREL Reason Code
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901144
3.6.2.1 PUBREL Reason Code
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901145
3.6.2.2 PUBREL Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ v5_suback_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::v5_suback_handler = std::function< bool(packet_id_t packet_id, std::vector<v5::suback_reason_code> reasons, v5::properties props) >

Suback handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901173
3.9.2 Variable header
reasonsCollection of reason_code.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901178
3.9.3 SUBACK Payload
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901174
3.9.2.1 SUBACK Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ v5_subscribe_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::v5_subscribe_handler = std::function< bool(packet_id_t packet_id, std::vector<subscribe_entry> entries, v5::properties props) >

Subscribe handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901163
3.8.2 Variable header
entriesCollection of Share Name, Topic Filter, and Subscribe Options.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901168
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901164
3.8.2.1 SUBSCRIBE Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ v5_unsuback_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::v5_unsuback_handler = std::function< bool(packet_id_t, std::vector<v5::unsuback_reason_code> reasons, v5::properties props) >

Unsuback handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901189
3.11.2 Variable header
reasonsCollection of reason_code.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901194
3.11.3 UNSUBACK Payload
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901190
3.11.2.1 UNSUBACK Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ v5_unsubscribe_handler

template<typename Impl >
using MQTT_NS::callable_overlay< Impl >::v5_unsubscribe_handler = std::function< bool(packet_id_t packet_id, std::vector<unsubscribe_entry> entries, v5::properties props) >

Unsubscribe handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901181
3.10.2 Variable header
entriesCollection of Share Name and Topic Filter
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901185
3.10.3 UNSUBSCRIBE Payload
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901182
3.10.2.1 UNSUBSCRIBE Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

Constructor & Destructor Documentation

◆ callable_overlay() [1/3]

template<typename Impl >
template<typename ... Args>
MQTT_NS::callable_overlay< Impl >::callable_overlay ( Args &&...  args)
inline

◆ ~callable_overlay()

template<typename Impl >
MQTT_NS::callable_overlay< Impl >::~callable_overlay ( )
default

◆ callable_overlay() [2/3]

template<typename Impl >
MQTT_NS::callable_overlay< Impl >::callable_overlay ( callable_overlay< Impl > &&  )
default

◆ callable_overlay() [3/3]

template<typename Impl >
MQTT_NS::callable_overlay< Impl >::callable_overlay ( callable_overlay< Impl > const &  )
default

Member Function Documentation

◆ check_is_valid_length()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::check_is_valid_length ( control_packet_type  packet_type,
std::size_t  remaining_length 
)
inlinefinaloverridenoexcept

is valid length handler This handler is called when remaining length is received.

Parameters
control_packet_typecontrol_packet_type that has variable length
remaininglength
Returns
true if check is success, otherwise false

◆ get_close_handler()

template<typename Impl >
close_handler MQTT_NS::callable_overlay< Impl >::get_close_handler ( ) const
inline

Get close handler.

Returns
handler

◆ get_connack_handler()

template<typename Impl >
connack_handler const& MQTT_NS::callable_overlay< Impl >::get_connack_handler ( ) const
inline

Get connack handler.

Returns
handler

◆ get_connect_handler()

template<typename Impl >
connect_handler const& MQTT_NS::callable_overlay< Impl >::get_connect_handler ( ) const
inline

Get connect handler.

Returns
handler

◆ get_disconnect_handler()

template<typename Impl >
disconnect_handler const& MQTT_NS::callable_overlay< Impl >::get_disconnect_handler ( ) const
inline

Get disconnect handler.

Returns
handler

◆ get_error_handler()

template<typename Impl >
error_handler MQTT_NS::callable_overlay< Impl >::get_error_handler ( ) const
inline

Get error handler.

Returns
handler

◆ get_is_valid_length_handler()

template<typename Impl >
is_valid_length_handler const& MQTT_NS::callable_overlay< Impl >::get_is_valid_length_handler ( ) const
inline

Get check length handler.

Returns
handler

◆ get_mqtt_message_processed_handler()

template<typename Impl >
mqtt_message_processed_handler MQTT_NS::callable_overlay< Impl >::get_mqtt_message_processed_handler ( ) const
inline

Get mqtt_message_processed_handler.

Returns
mqtt_message_processed_handler.

◆ get_pingreq_handler()

template<typename Impl >
pingreq_handler const& MQTT_NS::callable_overlay< Impl >::get_pingreq_handler ( ) const
inline

Get pingreq handler.

Returns
handler

◆ get_pingresp_handler()

template<typename Impl >
pingresp_handler const& MQTT_NS::callable_overlay< Impl >::get_pingresp_handler ( ) const
inline

Get pingresp handler.

Returns
handler

◆ get_pre_send_handler()

template<typename Impl >
pre_send_handler const& MQTT_NS::callable_overlay< Impl >::get_pre_send_handler ( ) const
inline

Get pre-send handler.

Returns
handler

◆ get_pub_res_sent_handler()

template<typename Impl >
pub_res_sent_handler const& MQTT_NS::callable_overlay< Impl >::get_pub_res_sent_handler ( ) const
inline

Get publish response sent handler.

Returns
handler

◆ get_puback_handler()

template<typename Impl >
puback_handler const& MQTT_NS::callable_overlay< Impl >::get_puback_handler ( ) const
inline

Get puback handler.

Returns
handler

◆ get_pubcomp_handler()

template<typename Impl >
pubcomp_handler const& MQTT_NS::callable_overlay< Impl >::get_pubcomp_handler ( ) const
inline

Get pubcomp handler.

Returns
handler

◆ get_publish_handler()

template<typename Impl >
publish_handler const& MQTT_NS::callable_overlay< Impl >::get_publish_handler ( ) const
inline

Set publish handler.

Returns
handler

◆ get_pubrec_handler()

template<typename Impl >
pubrec_handler const& MQTT_NS::callable_overlay< Impl >::get_pubrec_handler ( ) const
inline

Get pubrec handler.

Returns
handler

◆ get_pubrel_handler()

template<typename Impl >
pubrel_handler const& MQTT_NS::callable_overlay< Impl >::get_pubrel_handler ( ) const
inline

Get pubrel handler.

Returns
handler

◆ get_serialize_publish_message_handler()

template<typename Impl >
serialize_publish_message_handler const& MQTT_NS::callable_overlay< Impl >::get_serialize_publish_message_handler ( ) const
inline

Get serialize publish handler.

Returns
handler

◆ get_serialize_pubrel_message_handler()

template<typename Impl >
serialize_pubrel_message_handler const& MQTT_NS::callable_overlay< Impl >::get_serialize_pubrel_message_handler ( ) const
inline

Get serialize pubrel handler.

Returns
handler

◆ get_serialize_remove_handler()

template<typename Impl >
serialize_remove_handler const& MQTT_NS::callable_overlay< Impl >::get_serialize_remove_handler ( ) const
inline

Get serialize remove handler.

Returns
handler

◆ get_serialize_v5_publish_message_handler()

template<typename Impl >
serialize_v5_publish_message_handler const& MQTT_NS::callable_overlay< Impl >::get_serialize_v5_publish_message_handler ( ) const
inline

Get serialize publish handler.

Returns
handler

◆ get_serialize_v5_pubrel_message_handler()

template<typename Impl >
serialize_v5_pubrel_message_handler const& MQTT_NS::callable_overlay< Impl >::get_serialize_v5_pubrel_message_handler ( ) const
inline

Get serialize pubrel handler.

Returns
handler

◆ get_suback_handler()

template<typename Impl >
suback_handler const& MQTT_NS::callable_overlay< Impl >::get_suback_handler ( ) const
inline

Get suback handler.

Returns
handler

◆ get_subscribe_handler()

template<typename Impl >
subscribe_handler const& MQTT_NS::callable_overlay< Impl >::get_subscribe_handler ( ) const
inline

Get subscribe handler.

Returns
handler

◆ get_unsuback_handler()

template<typename Impl >
unsuback_handler const& MQTT_NS::callable_overlay< Impl >::get_unsuback_handler ( ) const
inline

Get unsuback handler.

Returns
handler

◆ get_unsubscribe_handler()

template<typename Impl >
unsubscribe_handler const& MQTT_NS::callable_overlay< Impl >::get_unsubscribe_handler ( ) const
inline

Get unsubscribe handler.

Returns
handler

◆ get_v5__handler()

template<typename Impl >
v5_pubrec_handler const& MQTT_NS::callable_overlay< Impl >::get_v5__handler ( ) const
inline

Get pubrec handler.

Returns
handler

◆ get_v5_auth_handler()

template<typename Impl >
v5_auth_handler const& MQTT_NS::callable_overlay< Impl >::get_v5_auth_handler ( ) const
inline

Get auth handler.

Returns
handler

◆ get_v5_connack_handler()

template<typename Impl >
v5_connack_handler const& MQTT_NS::callable_overlay< Impl >::get_v5_connack_handler ( ) const
inline

Get connack handler.

Returns
handler

◆ get_v5_connect_handler()

template<typename Impl >
v5_connect_handler const& MQTT_NS::callable_overlay< Impl >::get_v5_connect_handler ( ) const
inline

Get connect handler.

Returns
handler

◆ get_v5_disconnect_handler()

template<typename Impl >
v5_disconnect_handler const& MQTT_NS::callable_overlay< Impl >::get_v5_disconnect_handler ( ) const
inline

Get disconnect handler.

Returns
handler

◆ get_v5_puback_handler()

template<typename Impl >
v5_puback_handler const& MQTT_NS::callable_overlay< Impl >::get_v5_puback_handler ( ) const
inline

Get puback handler.

Returns
handler

◆ get_v5_pubcomp_handler()

template<typename Impl >
v5_pubcomp_handler const& MQTT_NS::callable_overlay< Impl >::get_v5_pubcomp_handler ( ) const
inline

Get pubcomp handler.

Returns
handler

◆ get_v5_publish_handler()

template<typename Impl >
v5_publish_handler const& MQTT_NS::callable_overlay< Impl >::get_v5_publish_handler ( ) const
inline

Set publish handler.

Returns
handler

◆ get_v5_pubrel_handler()

template<typename Impl >
v5_pubrel_handler const& MQTT_NS::callable_overlay< Impl >::get_v5_pubrel_handler ( ) const
inline

Get pubrel handler.

Returns
handler

◆ get_v5_suback_handler()

template<typename Impl >
v5_suback_handler const& MQTT_NS::callable_overlay< Impl >::get_v5_suback_handler ( ) const
inline

Get suback handler.

Returns
handler

◆ get_v5_subscribe_handler()

template<typename Impl >
v5_subscribe_handler const& MQTT_NS::callable_overlay< Impl >::get_v5_subscribe_handler ( ) const
inline

Get subscribe handler.

Returns
handler

◆ get_v5_unsuback_handler()

template<typename Impl >
v5_unsuback_handler const& MQTT_NS::callable_overlay< Impl >::get_v5_unsuback_handler ( ) const
inline

Get unsuback handler.

Returns
handler

◆ get_v5_unsubscribe_handler()

template<typename Impl >
v5_unsubscribe_handler const& MQTT_NS::callable_overlay< Impl >::get_v5_unsubscribe_handler ( ) const
inline

Get unsubscribe handler.

Returns
handler

◆ on_close()

template<typename Impl >
MQTT_ALWAYS_INLINE void MQTT_NS::callable_overlay< Impl >::on_close ( )
inlinefinaloverridenoexcept

Close handler.

This handler is called if the client called disconnect() and the server closed the socket cleanly. If the socket is closed by other reasons, error_handler is called. This calls base::on_close() prior to calling the provided callback, if any.

◆ on_connack()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_connack ( bool  session_present,
connect_return_code  return_code 
)
inlinefinaloverridenoexcept

Connack handler.

Parameters
session_presentSession present flag.
See http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718036
3.2.2.2 Session Present
return_codeconnect_return_code
See http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718036
3.2.2.3 Connect Return code
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_connect()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_connect ( buffer  client_id,
optional< buffer user_name,
optional< buffer password,
optional< will will,
bool  clean_session,
std::uint16_t  keep_alive 
)
inlinefinaloverridenoexcept

Connect handler.

Parameters
client_idClient Identifier.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349245
3.1.3.1 Client Identifier
user_nameUser Name.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349245
3.1.3.4 User Name
passwordPassword.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349246
3.1.3.5 Password
willWill. It contains retain, QoS, topic, and message.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349232
3.1.2.5 Will Flag
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349233
3.1.2.6 Will QoS
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349234
3.1.2.7 Will Retain
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349243
3.1.3.2 Will Topic
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349244
3.1.3.3 Will Message
clean_sessionClean Session
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349231
3.1.2.4 Clean Session
keep_aliveKeep Alive
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349237
3.1.2.10 Keep Alive
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_disconnect()

template<typename Impl >
MQTT_ALWAYS_INLINE void MQTT_NS::callable_overlay< Impl >::on_disconnect ( )
inlinefinaloverridenoexcept

Disconnect handler See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc384800463
3.14 DISCONNECT – Disconnect notification.

◆ on_error()

template<typename Impl >
MQTT_ALWAYS_INLINE void MQTT_NS::callable_overlay< Impl >::on_error ( error_code  ec)
inlinefinaloverridenoexcept

Error handler.

This handler is called if the socket is closed without client's disconnect() call. This calls base::on_error() prior to calling the provided callback, if any.

Parameters
ecerror code

◆ on_mqtt_message_processed()

template<typename Impl >
MQTT_ALWAYS_INLINE void MQTT_NS::callable_overlay< Impl >::on_mqtt_message_processed ( any  session_life_keeper)
inlinefinaloverridenoexcept

next read handler This handler is called when the current mqtt message has been processed. This calls base::on_mqtt_message_processed() only if mqtt_message_processed handler is not set.

  • client inherits endpoint and override on_pre_send(), on_close(), and on_error(). And implement important process *1 in the override definition (timer reset, timer cancel).
  • client has set_pre_send_handler(), set_on_close(), and set_on_error(). If a user of client call them, and the event happens, set handler should be called. Either the user set handlers or not, *1 should be executed automatically.
  • endpoint has the default definition of on_mqtt_message_processed(). client doesn't override on_mqtt_message_processed(). If a user override this, then the default definition shouldn't be called. It makes conflict behavior.
  • Other on_*() doesn't have the default definition. callable_overlay calls the corresponding handler only if it is set.
    Parameters
    funcA callback function that is called when async operation will finish.

◆ on_pingreq()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_pingreq ( )
inlinefinaloverridenoexcept

Pingreq handler See http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718086
3.13 PINGREQ – PING request.

Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_pingresp()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_pingresp ( )
inlinefinaloverridenoexcept

Pingresp handler See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901200
3.13 PINGRESP – PING response.

Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_pre_send()

template<typename Impl >
MQTT_ALWAYS_INLINE void MQTT_NS::callable_overlay< Impl >::on_pre_send ( )
inlinefinaloverridenoexcept

Pre-send handler This handler is called when any mqtt control packet is decided to send.

◆ on_pub_res_sent()

template<typename Impl >
MQTT_ALWAYS_INLINE void MQTT_NS::callable_overlay< Impl >::on_pub_res_sent ( packet_id_t  packet_id)
inlinefinaloverridenoexcept

Publish response sent handler This function is called just after puback sent on QoS1, or pubcomp sent on QoS2.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901026
2.2.1 Packet Identifier

◆ on_puback()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_puback ( packet_id_t  packet_id)
inlinefinaloverridenoexcept

Puback handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc398718045
3.4.2 Variable header
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_pubcomp()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_pubcomp ( packet_id_t  packet_id)
inlinefinaloverridenoexcept

Pubcomp handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc398718060
3.7.2 Variable header
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_publish()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_publish ( optional< packet_id_t packet_id,
publish_options  pubopts,
buffer  topic_name,
buffer  contents 
)
inlinefinaloverridenoexcept

Publish handler.

Parameters
packet_idpacket identifier
If received publish's QoS is 0, packet_id is nullopt.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc398718039
3.3.2 Variable header
fixed_headerSee https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc398718038
3.3.1 Fixed header
You can check the fixed header using publish functions.
topic_nameTopic name
contentsPublished contents
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_pubrec()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_pubrec ( packet_id_t  packet_id)
inlinefinaloverridenoexcept

Pubrec handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc398718050
3.5.2 Variable header
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_pubrel()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_pubrel ( packet_id_t  packet_id)
inlinefinaloverridenoexcept

Pubrel handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349791
3.6.2 Variable header
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_serialize_publish_message()

template<typename Impl >
MQTT_ALWAYS_INLINE void MQTT_NS::callable_overlay< Impl >::on_serialize_publish_message ( basic_publish_message< sizeof(packet_id_t)>  msg)
inlinefinaloverridenoexcept

Serialize publish handler You can serialize the publish message. To restore the message, use restore_serialized_message().

Parameters
msgpublish message

◆ on_serialize_pubrel_message()

template<typename Impl >
MQTT_ALWAYS_INLINE void MQTT_NS::callable_overlay< Impl >::on_serialize_pubrel_message ( basic_pubrel_message< sizeof(packet_id_t)>  msg)
inlinefinaloverridenoexcept

Serialize pubrel handler You can serialize the pubrel message. If your storage has already had the publish message that has the same packet_id, then you need to replace the publish message to pubrel message. To restore the message, use restore_serialized_message().

Parameters
msgpubrel message

◆ on_serialize_remove()

template<typename Impl >
MQTT_ALWAYS_INLINE void MQTT_NS::callable_overlay< Impl >::on_serialize_remove ( packet_id_t  packet_id)
inlinefinaloverridenoexcept

Remove serialized message.

Parameters
packet_idpacket identifier of the removing message

◆ on_serialize_v5_publish_message()

template<typename Impl >
MQTT_ALWAYS_INLINE void MQTT_NS::callable_overlay< Impl >::on_serialize_v5_publish_message ( v5::basic_publish_message< sizeof(packet_id_t)>  msg)
inlinefinaloverridenoexcept

Serialize publish handler You can serialize the publish message. To restore the message, use restore_serialized_message().

Parameters
msgv5::publish message

◆ on_serialize_v5_pubrel_message()

template<typename Impl >
MQTT_ALWAYS_INLINE void MQTT_NS::callable_overlay< Impl >::on_serialize_v5_pubrel_message ( v5::basic_pubrel_message< sizeof(packet_id_t)>  msg)
inlinefinaloverridenoexcept

Serialize pubrel handler You can serialize the pubrel message. If your storage has already had the publish message that has the same packet_id, then you need to replace the publish message to pubrel message. To restore the message, use restore_serialized_message().

Parameters
msgpubrel message

◆ on_suback()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_suback ( packet_id_t  packet_id,
std::vector< suback_return_code reasons 
)
inlinefinaloverridenoexcept

Suback handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc398718070
3.9.2 Variable header
qossCollection of QoS that is corresponding to subscribed topic order.
If subscription is failure, the value is nullopt.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc398718071
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_subscribe()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_subscribe ( packet_id_t  packet_id,
std::vector< subscribe_entry entries 
)
inlinefinaloverridenoexcept

Subscribe handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349801
3.8.2 Variable header
entriesCollection of Share Name, Topic Filter, and QoS.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349802
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_unsuback()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_unsuback ( packet_id_t  packet_id)
inlinefinaloverridenoexcept

Unsuback handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc398718045
3.11.2 Variable header
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_unsubscribe()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_unsubscribe ( packet_id_t  packet_id,
std::vector< unsubscribe_entry entries 
)
inlinefinaloverridenoexcept

Unsubscribe handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc385349810
3.10.2 Variable header
topicsCollection of Share Name and Topic Filter
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc384800448
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_v5_auth()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_v5_auth ( v5::auth_reason_code  reason_code,
v5::properties  props 
)
inlinefinaloverridenoexcept

Auth handler See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901217
3.15 AUTH – Authentication exchange.

Parameters
reason_codeAUTH Reason Code
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901220
3.15.2.1 Authenticate Reason Code
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901221
3.15.2.2 AUTH Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_v5_connack()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_v5_connack ( bool  session_present,
v5::connect_reason_code  reason_code,
v5::properties  props 
)
inlinefinaloverridenoexcept

Connack handler.

Parameters
session_presentSession present flag.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901078
3.2.2.1.1 Session Present
reason_codeConnect Reason Code
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901079
3.2.2.2 Connect Reason code
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901080
3.2.2.3 CONNACK Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_v5_connect()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_v5_connect ( buffer  client_id,
optional< buffer user_name,
optional< buffer password,
optional< will will,
bool  clean_start,
std::uint16_t  keep_alive,
v5::properties  props 
)
inlinefinaloverridenoexcept

Connect handler.

Parameters
client_idClient Identifier.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901059
3.1.3.1 Client Identifier
user_nameUser Name.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901071
3.1.3.4 User Name
passwordPassword.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901072
3.1.3.5 Password
willWill. It contains retain, QoS, propertied, topic, and message.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901040
3.1.2.5 Will Flag
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901041
3.1.2.6 Will QoS
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901042
3.1.2.7 Will Retain
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901060
3.1.3.2 Will Properties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901069
3.1.3.3 Will Topic
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901070
3.1.3.3 Will Payload
clean_startClean Start
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901039
3.1.2.4 Clean Session
keep_aliveKeep Alive
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901045
3.1.2.10 Keep Alive
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901046
3.1.2.11 CONNECT Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_v5_disconnect()

template<typename Impl >
MQTT_ALWAYS_INLINE void MQTT_NS::callable_overlay< Impl >::on_v5_disconnect ( v5::disconnect_reason_code  reason_code,
v5::properties  props 
)
inlinefinaloverridenoexcept

Disconnect handler See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901205
3.14 DISCONNECT – Disconnect notification.

Parameters
reason_codeDISCONNECT Reason Code
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901208
3.14.2.1 Disconnect Reason Code
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901209
3.14.2.2 DISCONNECT Properties

◆ on_v5_puback()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_v5_puback ( packet_id_t  packet_id,
v5::puback_reason_code  reason_code,
v5::properties  props 
)
inlinefinaloverridenoexcept

Puback handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901123
3.4.2 Variable header
reason_codePUBACK Reason Code
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901124
3.4.2.1 PUBACK Reason Code
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901125
3.4.2.2 PUBACK Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_v5_pubcomp()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_v5_pubcomp ( packet_id_t  packet_id,
v5::pubcomp_reason_code  reason_code,
v5::properties  props 
)
inlinefinaloverridenoexcept

Pubcomp handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901153
3.7.2 Variable header
reason_codePUBCOMP Reason Code
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901154
3.7.2.1 PUBCOMP Reason Code
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901155
3.7.2.2 PUBCOMP Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_v5_publish()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_v5_publish ( optional< packet_id_t packet_id,
publish_options  pubopts,
buffer  topic_name,
buffer  contents,
v5::properties  props 
)
inlinefinaloverridenoexcept

Publish handler.

Parameters
packet_idpacket identifier
If received publish's QoS is 0, packet_id is nullopt.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901108
3.3.2.2 Packet Identifier
fixed_headerSee https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901101
3.3.1 Fixed header
You can check the fixed header using publish functions.
topic_nameTopic name
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901107
3.3.2.1 Topic Name
contentsPublish Payload
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901119
3.3.3 PUBLISH Payload
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901109
3.3.2.3 PUBLISH Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_v5_pubrec()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_v5_pubrec ( packet_id_t  packet_id,
v5::pubrec_reason_code  reason_code,
v5::properties  props 
)
inlinefinaloverridenoexcept

Pubrec handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901133
3.5.2 Variable header
reason_codePUBREC Reason Code
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901134
3.5.2.1 PUBREC Reason Code
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901135
3.5.2.2 PUBREC Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_v5_pubrel()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_v5_pubrel ( packet_id_t  packet_id,
v5::pubrel_reason_code  reason_code,
v5::properties  props 
)
inlinefinaloverridenoexcept

Pubrel handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901143
3.6.2 Variable header
reason_codePUBREL Reason Code
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901144
3.6.2.1 PUBREL Reason Code
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901145
3.6.2.2 PUBREL Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_v5_suback()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_v5_suback ( packet_id_t  packet_id,
std::vector< v5::suback_reason_code reasons,
v5::properties  props 
)
inlinefinaloverridenoexcept

Suback handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901173
3.9.2 Variable header
reasonsCollection of reason_code.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901178
3.9.3 SUBACK Payload
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901174
3.9.2.1 SUBACK Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_v5_subscribe()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_v5_subscribe ( packet_id_t  packet_id,
std::vector< subscribe_entry entries,
v5::properties  props 
)
inlinefinaloverridenoexcept

Subscribe handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901163
3.8.2 Variable header
entriesCollection of Share Name, Topic Filter, and QoS.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901168
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901164
3.8.2.1 SUBSCRIBE Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_v5_unsuback()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_v5_unsuback ( packet_id_t  packet_id,
std::vector< v5::unsuback_reason_code reasons,
v5::properties  props 
)
inlinefinaloverridenoexcept

Unsuback handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901189
3.11.2 Variable header
reasonsCollection of reason_code.
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901194
3.11.3 UNSUBACK Payload
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901190
3.11.2.1 UNSUBACK Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ on_v5_unsubscribe()

template<typename Impl >
MQTT_ALWAYS_INLINE bool MQTT_NS::callable_overlay< Impl >::on_v5_unsubscribe ( packet_id_t  packet_id,
std::vector< unsubscribe_entry entries,
v5::properties  props 
)
inlinefinaloverridenoexcept

Unsubscribe handler.

Parameters
packet_idpacket identifier
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901181
3.10.2 Variable header
entriesCollection of Share Name and Topic Filter
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901185
3.10.3 UNSUBSCRIBE Payload
propsProperties
See https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901182
3.10.2.1 UNSUBSCRIBE Properties
Returns
if the handler returns true, then continue receiving, otherwise quit.

◆ operator=() [1/2]

template<typename Impl >
callable_overlay& MQTT_NS::callable_overlay< Impl >::operator= ( callable_overlay< Impl > &&  )
default

◆ operator=() [2/2]

template<typename Impl >
callable_overlay& MQTT_NS::callable_overlay< Impl >::operator= ( callable_overlay< Impl > const &  )
default

◆ set_close_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_close_handler ( close_handler  h = close_handler())
inline

Set close handler.

Parameters
hhandler

◆ set_connack_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_connack_handler ( connack_handler  h = connack_handler())
inline

Set connack handler.

Parameters
hhandler

◆ set_connect_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_connect_handler ( connect_handler  h = connect_handler())
inline

Set connect handler.

Parameters
hhandler

◆ set_disconnect_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_disconnect_handler ( disconnect_handler  h = disconnect_handler())
inline

Set disconnect handler.

Parameters
hhandler

◆ set_error_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_error_handler ( error_handler  h = error_handler())
inline

Set error handler.

Parameters
hhandler

◆ set_is_valid_length_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_is_valid_length_handler ( is_valid_length_handler  h = is_valid_length_handler())
inline

Set check length handler.

Parameters
hhandler

◆ set_mqtt_message_processed_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_mqtt_message_processed_handler ( mqtt_message_processed_handler  h = mqtt_message_processed_handler())
inline

Set custom mqtt_message_processed_handler. The default setting is calling async_read_control_packet_type(). (See endpoint() constructor). The typical usecase of this function is delaying the next message reading timing. In order to do that 1) store func parameter of the mqtt_message_processed_handler. 2) call async_read_next_message with the stored func if you are ready to read the next mqtt message.

Parameters
hmqtt_message_processed_handler.

◆ set_pingreq_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_pingreq_handler ( pingreq_handler  h = pingreq_handler())
inline

Set pingreq handler.

Parameters
hhandler

◆ set_pingresp_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_pingresp_handler ( pingresp_handler  h = pingresp_handler())
inline

Set pingresp handler.

Parameters
hhandler

◆ set_pre_send_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_pre_send_handler ( pre_send_handler  h = pre_send_handler())
inline

Set pre-send handler.

Parameters
hhandler

◆ set_pub_res_sent_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_pub_res_sent_handler ( pub_res_sent_handler  h = pub_res_sent_handler())
inline

Set pubcomp handler.

Parameters
hhandler

◆ set_puback_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_puback_handler ( puback_handler  h = puback_handler())
inline

Set puback handler.

Parameters
hhandler

◆ set_pubcomp_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_pubcomp_handler ( pubcomp_handler  h = pubcomp_handler())
inline

Set pubcomp handler.

Parameters
hhandler

◆ set_publish_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_publish_handler ( publish_handler  h = publish_handler())
inline

Set publish handler.

Parameters
hhandler

◆ set_pubrec_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_pubrec_handler ( pubrec_handler  h = pubrec_handler())
inline

Set pubrec handler.

Parameters
hhandler

◆ set_pubrel_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_pubrel_handler ( pubrel_handler  h = pubrel_handler())
inline

Set pubrel handler.

Parameters
hhandler

◆ set_serialize_handlers() [1/3]

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_serialize_handlers ( )
inline

Clear serialize handlers.

◆ set_serialize_handlers() [2/3]

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_serialize_handlers ( serialize_publish_handler  h_publish,
serialize_pubrel_handler  h_pubrel,
serialize_remove_handler  h_remove 
)
inline

Set serialize handlers.

Parameters
h_publishserialize handler for publish message
h_pubrelserialize handler for pubrel message
h_removeremove handler for serialized message

◆ set_serialize_handlers() [3/3]

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_serialize_handlers ( serialize_publish_message_handler  h_publish,
serialize_pubrel_message_handler  h_pubrel,
serialize_remove_handler  h_remove 
)
inline

Set serialize handlers.

Parameters
h_publishserialize handler for publish message
h_pubrelserialize handler for pubrel message
h_removeremove handler for serialized message

◆ set_suback_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_suback_handler ( suback_handler  h = suback_handler())
inline

Set suback handler.

Parameters
hhandler

◆ set_subscribe_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_subscribe_handler ( subscribe_handler  h = subscribe_handler())
inline

Set subscribe handler.

Parameters
hhandler

◆ set_unsuback_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_unsuback_handler ( unsuback_handler  h = unsuback_handler())
inline

Set unsuback handler.

Parameters
hhandler

◆ set_unsubscribe_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_unsubscribe_handler ( unsubscribe_handler  h = unsubscribe_handler())
inline

Set unsubscribe handler.

Parameters
hhandler

◆ set_v5_auth_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_v5_auth_handler ( v5_auth_handler  h = v5_auth_handler())
inline

Set auth handler.

Parameters
hhandler

◆ set_v5_connack_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_v5_connack_handler ( v5_connack_handler  h = v5_connack_handler())
inline

Set connack handler.

Parameters
hhandler

◆ set_v5_connect_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_v5_connect_handler ( v5_connect_handler  h = v5_connect_handler())
inline

Set connect handler.

Parameters
hhandler

◆ set_v5_disconnect_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_v5_disconnect_handler ( v5_disconnect_handler  h = v5_disconnect_handler())
inline

Set disconnect handler.

Parameters
hhandler

◆ set_v5_puback_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_v5_puback_handler ( v5_puback_handler  h = v5_puback_handler())
inline

Set puback handler.

Parameters
hhandler

◆ set_v5_pubcomp_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_v5_pubcomp_handler ( v5_pubcomp_handler  h = v5_pubcomp_handler())
inline

Set pubcomp handler.

Parameters
hhandler

◆ set_v5_publish_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_v5_publish_handler ( v5_publish_handler  h = v5_publish_handler())
inline

Set publish handler.

Parameters
hhandler

◆ set_v5_pubrec_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_v5_pubrec_handler ( v5_pubrec_handler  h = v5_pubrec_handler())
inline

Set pubrec handler.

Parameters
hhandler

◆ set_v5_pubrel_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_v5_pubrel_handler ( v5_pubrel_handler  h = v5_pubrel_handler())
inline

Set pubrel handler.

Parameters
hhandler

◆ set_v5_serialize_handlers() [1/2]

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_v5_serialize_handlers ( serialize_publish_handler  h_publish,
serialize_pubrel_handler  h_pubrel,
serialize_remove_handler  h_remove 
)
inline

Set serialize handlers.

Parameters
h_publishserialize handler for publish message
h_pubrelserialize handler for pubrel message
h_removeremove handler for serialized message

◆ set_v5_serialize_handlers() [2/2]

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_v5_serialize_handlers ( serialize_v5_publish_message_handler  h_publish,
serialize_v5_pubrel_message_handler  h_pubrel,
serialize_remove_handler  h_remove 
)
inline

Set serialize handlers.

Parameters
h_publishserialize handler for publish message
h_pubrelserialize handler for pubrel message
h_removeremove handler for serialized message

◆ set_v5_suback_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_v5_suback_handler ( v5_suback_handler  h = v5_suback_handler())
inline

Set suback handler.

Parameters
hhandler

◆ set_v5_subscribe_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_v5_subscribe_handler ( v5_subscribe_handler  h = v5_subscribe_handler())
inline

Set subscribe handler.

Parameters
hhandler

◆ set_v5_unsuback_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_v5_unsuback_handler ( v5_unsuback_handler  h = v5_unsuback_handler())
inline

Set unsuback handler.

Parameters
hhandler

◆ set_v5_unsubscribe_handler()

template<typename Impl >
void MQTT_NS::callable_overlay< Impl >::set_v5_unsubscribe_handler ( v5_unsubscribe_handler  h = v5_unsubscribe_handler())
inline

Set unsubscribe handler.

Parameters
hhandler

The documentation for this struct was generated from the following file: