mqtt_cpp
Namespaces | Classes | Typedefs | Enumerations | Functions
MQTT_NS Namespace Reference

Namespaces

 connect_flags
 
 detail
 
 detail_v3_1_1
 
 error_check
 
 literals
 
 publish
 
 utf8string
 
 v3_1_1
 
 v5
 

Classes

class  async_client
 
class  buffer
 buffer that has string_view interface This class provides string_view interface. This class hold string_view target's lifetime optionally. More...
 
struct  is_buffer_sequence
 
struct  is_buffer_sequence< buffer >
 
struct  callable_overlay
 
class  client
 
class  endpoint
 
struct  protocol_error
 
struct  malformed_packet_error
 
struct  remaining_length_error
 
struct  variable_length_error
 
struct  utf8string_length_error
 
struct  utf8string_contents_error
 
struct  will_message_length_error
 
struct  password_length_error
 
struct  bytes_transferred_error
 
struct  read_bytes_transferred_error
 
struct  write_bytes_transferred_error
 
struct  packet_id_exhausted_error
 
struct  property_parse_error
 
struct  property_length_error
 
struct  restore_type_error
 
struct  channel
 
struct  null_strand
 
class  packet_id_manager
 
struct  publish_options
 
class  server_endpoint
 
class  server
 
struct  share_name_topic_filter
 
struct  subscribe_entry
 
struct  unsubscribe_entry
 
struct  subscribe_options
 
class  sync_client
 
class  tcp_endpoint
 
class  topic_alias_recv
 
class  topic_alias_send
 
struct  two_or_four_byte_type
 
struct  two_or_four_byte_type< 2 >
 
struct  two_or_four_byte_type< 4 >
 
struct  make_two_or_four_byte
 
struct  make_two_or_four_byte< 2 >
 
struct  make_two_or_four_byte< 4 >
 
struct  add_two_or_four_byte_to_buf
 
struct  add_two_or_four_byte_to_buf< 2 >
 
struct  add_two_or_four_byte_to_buf< 4 >
 
class  socket
 
class  value_allocator
 
struct  lambda_visitor
 
struct  lambda_visitor< Lambda1, Lambdas... >
 
struct  lambda_visitor< Lambda1 >
 
class  will
 
class  ws_endpoint
 
struct  basic_puback_message
 
struct  basic_pubrec_message
 
struct  basic_pubrel_message
 
struct  basic_pubcomp_message
 
struct  basic_unsuback_message
 
struct  pingreq_message
 
struct  pingresp_message
 
struct  disconnect_message
 
class  connack_message
 
class  connect_message
 
class  basic_publish_message
 
class  basic_subscribe_message
 
class  basic_suback_message
 
class  basic_unsubscribe_message
 

Typedefs

using error_code = boost::system::error_code
 
using puback_message = basic_puback_message< 2 >
 
using pubrec_message = basic_pubrec_message< 2 >
 
using pubrel_message = basic_pubrel_message< 2 >
 
using pubrel_32_message = basic_pubrel_message< 4 >
 
using pubcomp_message = basic_pubcomp_message< 2 >
 
using unsuback_message = basic_unsuback_message< 2 >
 
using publish_message = basic_publish_message< 2 >
 
using publish_32_message = basic_publish_message< 4 >
 
using subscribe_message = basic_subscribe_message< 2 >
 
using suback_message = basic_suback_message< 2 >
 
using unsubscribe_message = basic_unsubscribe_message< 2 >
 
template<std::size_t PacketIdBytes>
using basic_message_variant = variant< v3_1_1::connect_message, v3_1_1::connack_message, v3_1_1::basic_publish_message< PacketIdBytes >, v3_1_1::basic_puback_message< PacketIdBytes >, v3_1_1::basic_pubrec_message< PacketIdBytes >, v3_1_1::basic_pubrel_message< PacketIdBytes >, v3_1_1::basic_pubcomp_message< PacketIdBytes >, v3_1_1::basic_subscribe_message< PacketIdBytes >, v3_1_1::basic_suback_message< PacketIdBytes >, v3_1_1::basic_unsubscribe_message< PacketIdBytes >, v3_1_1::basic_unsuback_message< PacketIdBytes >, v3_1_1::pingreq_message, v3_1_1::pingresp_message, v3_1_1::disconnect_message, v5::connect_message, v5::connack_message, v5::basic_publish_message< PacketIdBytes >, v5::basic_puback_message< PacketIdBytes >, v5::basic_pubrec_message< PacketIdBytes >, v5::basic_pubrel_message< PacketIdBytes >, v5::basic_pubcomp_message< PacketIdBytes >, v5::basic_subscribe_message< PacketIdBytes >, v5::basic_suback_message< PacketIdBytes >, v5::basic_unsubscribe_message< PacketIdBytes >, v5::basic_unsuback_message< PacketIdBytes >, v5::pingreq_message, v5::pingresp_message, v5::disconnect_message, v5::auth_message >
 
using message_variant = basic_message_variant< 2 >
 
template<std::size_t PacketIdBytes>
using basic_store_message_variant = variant< v3_1_1::basic_publish_message< PacketIdBytes >, v3_1_1::basic_pubrel_message< PacketIdBytes >, v5::basic_publish_message< PacketIdBytes >, v5::basic_pubrel_message< PacketIdBytes > >
 
using store_message_variant = basic_store_message_variant< 2 >
 
using nullopt_t = boost::none_t
 
template<std::size_t PacketIdBytes>
using packet_id_type = two_or_four_byte_type< PacketIdBytes >
 
template<std::size_t PacketIdBytes>
using make_packet_id = make_two_or_four_byte< PacketIdBytes >
 
template<std::size_t PacketIdBytes>
using add_packet_id_to_buf = add_two_or_four_byte_to_buf< PacketIdBytes >
 
using string_view = boost::string_ref
 
template<class CharT , class Traits = std::char_traits<CharT>>
using basic_string_view = boost::basic_string_ref< CharT, Traits >
 
using time_point_t = std::chrono::time_point< std::chrono::steady_clock >
 
using topic_alias_map_t = std::map< topic_alias_t, std::string >
 
using session_expiry_interval_t = std::uint32_t
 
using topic_alias_t = std::uint16_t
 

Enumerations

enum class  connect_return_code : std::uint8_t {
  accepted = 0 , unacceptable_protocol_version = 1 , identifier_rejected = 2 , server_unavailable = 3 ,
  bad_user_name_or_password = 4 , not_authorized = 5
}
 
enum class  control_packet_type : std::uint8_t {
  connect = 0b00010000 , connack = 0b00100000 , publish = 0b00110000 , puback = 0b01000000 ,
  pubrec = 0b01010000 , pubrel = 0b01100000 , pubcomp = 0b01110000 , subscribe = 0b10000000 ,
  suback = 0b10010000 , unsubscribe = 0b10100000 , unsuback = 0b10110000 , pingreq = 0b11000000 ,
  pingresp = 0b11010000 , disconnect = 0b11100000 , auth = 0b11110000
}
 
enum class  control_packet_reserved_bits : std::uint8_t {
  connect = 0b00000000 , connack = 0b00000000 , puback = 0b00000000 , pubrec = 0b00000000 ,
  pubrel = 0b00000010 , pubcomp = 0b00000000 , subscribe = 0b00000010 , suback = 0b00000000 ,
  unsubscribe = 0b00000010 , unsuback = 0b00000000 , pingreq = 0b00000000 , pingresp = 0b00000000 ,
  disconnect = 0b00000000 , auth = 0b00000000
}
 
enum class  severity_level {
  trace , debug , info , warning ,
  error , fatal
}
 
enum class  protocol_version { undetermined = 0 , v3_1_1 = 4 , v5 = 5 }
 
enum class  retain : std::uint8_t { yes = 0b00000001 , no = 0b00000000 }
 
enum class  dup : std::uint8_t { yes = 0b00001000 , no = 0b00000000 }
 
enum class  suback_return_code : std::uint8_t { success_maximum_qos_0 = 0x00 , success_maximum_qos_1 = 0x01 , success_maximum_qos_2 = 0x02 , failure = 0x80 }
 
enum class  retain_handling : std::uint8_t { send = 0b00000000 , send_only_new_subscription = 0b00010000 , not_send = 0b00100000 }
 
enum class  rap : std::uint8_t { dont = 0b00000000 , retain = 0b00001000 }
 
enum class  nl : std::uint8_t { no = 0b00000000 , yes = 0b00000100 }
 
enum class  qos : std::uint8_t { at_most_once = 0b00000000 , at_least_once = 0b00000001 , exactly_once = 0b00000010 }
 

Functions

std::shared_ptr< callable_overlay< async_client< tcp_endpoint< as::ip::tcp::socket, as::io_context::strand > > > > make_async_client (as::io_context &ioc, std::string host, std::string port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< async_client< tcp_endpoint< as::ip::tcp::socket, as::io_context::strand > > > > make_async_client (as::io_context &ioc, std::string host, std::uint16_t port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< async_client< tcp_endpoint< as::ip::tcp::socket, null_strand > > > > make_async_client_no_strand (as::io_context &ioc, std::string host, std::string port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< async_client< tcp_endpoint< as::ip::tcp::socket, null_strand > > > > make_async_client_no_strand (as::io_context &ioc, std::string host, std::uint16_t port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< async_client< tcp_endpoint< as::ip::tcp::socket, as::io_context::strand >, 4 > > > make_async_client_32 (as::io_context &ioc, std::string host, std::string port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< async_client< tcp_endpoint< as::ip::tcp::socket, as::io_context::strand >, 4 > > > make_async_client_32 (as::io_context &ioc, std::string host, std::uint16_t port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< async_client< tcp_endpoint< as::ip::tcp::socket, null_strand >, 4 > > > make_async_client_no_strand_32 (as::io_context &ioc, std::string host, std::string port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< async_client< tcp_endpoint< as::ip::tcp::socket, null_strand >, 4 > > > make_async_client_no_strand_32 (as::io_context &ioc, std::string host, std::uint16_t port, protocol_version version=protocol_version::v3_1_1)
 
buffer operator""_mb (char const *str, std::size_t length)
 user defined literals for buffer If user use this out of mqtt scope, then user need to declare using namespace literals. When user write "ABC"_mb, then this function is called. The created buffer doesn't hold any lifetimes because the string literals has static strage duration, so buffer doesn't need to hold the lifetime. More...
 
template<typename Iterator >
buffer allocate_buffer (Iterator b, Iterator e)
 create buffer from the pair of iterators It copies string that from b to e into shared_ptr_array. Then create buffer and return it. The buffer holds the lifetime of shared_ptr_array. More...
 
buffer allocate_buffer (string_view sv)
 create buffer from the string_view It copies string that from string_view into shared_ptr_array. Then create buffer and return it. The buffer holds the lifetime of shared_ptr_array. More...
 
buffer const * buffer_sequence_begin (buffer const &buf)
 
buffer const * buffer_sequence_end (buffer const &buf)
 
template<typename Col >
Col::const_iterator buffer_sequence_begin (Col const &col)
 
template<typename Col >
Col::const_iterator buffer_sequence_end (Col const &col)
 
std::shared_ptr< callable_overlay< client< tcp_endpoint< as::ip::tcp::socket, as::io_context::strand > > > > make_client (as::io_context &ioc, std::string host, std::string port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< client< tcp_endpoint< as::ip::tcp::socket, as::io_context::strand > > > > make_client (as::io_context &ioc, std::string host, std::uint16_t port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< client< tcp_endpoint< as::ip::tcp::socket, null_strand > > > > make_client_no_strand (as::io_context &ioc, std::string host, std::string port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< client< tcp_endpoint< as::ip::tcp::socket, null_strand > > > > make_client_no_strand (as::io_context &ioc, std::string host, std::uint16_t port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< client< tcp_endpoint< as::ip::tcp::socket, as::io_context::strand >, 4 > > > make_client_32 (as::io_context &ioc, std::string host, std::string port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< client< tcp_endpoint< as::ip::tcp::socket, as::io_context::strand >, 4 > > > make_client_32 (as::io_context &ioc, std::string host, std::uint16_t port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< client< tcp_endpoint< as::ip::tcp::socket, null_strand >, 4 > > > make_client_no_strand_32 (as::io_context &ioc, std::string host, std::string port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< client< tcp_endpoint< as::ip::tcp::socket, null_strand >, 4 > > > make_client_no_strand_32 (as::io_context &ioc, std::string host, std::uint16_t port, protocol_version version=protocol_version::v3_1_1)
 
constexpr char const * connect_return_code_to_str (connect_return_code v)
 
std::ostream & operator<< (std::ostream &os, connect_return_code val)
 
char const * get_pointer (as::const_buffer const &cb)
 
std::size_t get_size (as::const_buffer const &cb)
 
constexpr control_packet_type get_control_packet_type (std::uint8_t v)
 
constexpr char const * control_packet_type_to_str (control_packet_type v)
 
std::ostream & operator<< (std::ostream &os, control_packet_type val)
 
optional< control_packet_typeget_control_packet_type_with_check (std::uint8_t v)
 
constexpr std::uint8_t make_fixed_header (control_packet_type type, std::uint8_t flags)
 
boost::container::static_vector< char, 4 > num_to_4bytes (std::uint32_t val)
 
template<typename T >
void add_uint32_t_to_buf (T &buf, std::uint32_t num)
 
template<typename It >
constexpr std::uint32_t make_uint32_t (It b, It e)
 
template<typename T >
void hexdump (std::ostream &os, T const &v)
 
std::ostream & operator<< (std::ostream &o, severity_level sev)
 
template<std::size_t PacketIdBytes>
std::vector< as::const_buffer > const_buffer_sequence (basic_message_variant< PacketIdBytes > const &mv)
 
template<std::size_t PacketIdBytes>
std::size_t size (basic_message_variant< PacketIdBytes > const &mv)
 
template<std::size_t PacketIdBytes>
std::size_t num_of_const_buffer_sequence (basic_message_variant< PacketIdBytes > const &mv)
 
template<std::size_t PacketIdBytes>
std::string continuous_buffer (basic_message_variant< PacketIdBytes > const &mv)
 
template<std::size_t PacketIdBytes>
basic_message_variant< PacketIdBytes > get_basic_message_variant (basic_store_message_variant< PacketIdBytes > smv)
 
template<std::size_t PacketIdBytes>
std::string continuous_buffer (basic_store_message_variant< PacketIdBytes > const &mv)
 
template<typename T >
constexpr std::remove_reference_t< T > && force_move (T &&t)
 
bool operator== (null_strand const &lhs, null_strand const &rhs)
 
bool operator!= (null_strand const &lhs, null_strand const &rhs)
 
constexpr char const * protocol_version_to_str (protocol_version v)
 
std::ostream & operator<< (std::ostream &os, protocol_version val)
 
constexpr publish_options operator| (retain lhs, dup rhs)
 
constexpr publish_options operator| (retain lhs, qos rhs)
 
constexpr publish_options operator| (dup lhs, retain rhs)
 
constexpr publish_options operator| (dup lhs, qos rhs)
 
constexpr publish_options operator| (qos lhs, retain rhs)
 
constexpr publish_options operator| (qos lhs, dup rhs)
 
constexpr char const * retain_to_str (retain v)
 
std::ostream & operator<< (std::ostream &os, retain val)
 
constexpr char const * dup_to_str (dup v)
 
std::ostream & operator<< (std::ostream &os, dup val)
 
constexpr char const * suback_return_code_to_str (suback_return_code v)
 
std::ostream & operator<< (std::ostream &os, suback_return_code val)
 
constexpr suback_return_code qos_to_suback_return_code (qos q)
 
std::string remaining_bytes (std::size_t size)
 
constexpr std::tuple< std::size_t, std::size_t > remaining_length (string_view bytes)
 
template<typename Iterator >
constexpr std::tuple< std::size_t, std::size_t > remaining_length (Iterator b, Iterator e)
 
constexpr bool is_session_present (char v)
 
template<typename... Params>
void setup_log (Params &&...)
 
template<typename Proc >
auto shared_scope_guard (Proc &&proc)
 
bool operator< (share_name_topic_filter const &lhs, share_name_topic_filter const &rhs)
 
bool operator== (share_name_topic_filter const &lhs, share_name_topic_filter const &rhs)
 
bool operator!= (share_name_topic_filter const &lhs, share_name_topic_filter const &rhs)
 
optional< share_name_topic_filterparse_shared_subscription (buffer whole_topic_filter)
 
buffer create_topic_filter_buffer (string_view share_name, string_view topic_filter)
 
buffer create_topic_filter_buffer (string_view share_name, buffer topic_filter)
 
void utf8string_check (string_view str)
 
void utf8string_check (as::const_buffer str)
 
constexpr subscribe_options operator| (retain_handling lhs, rap rhs)
 
constexpr subscribe_options operator| (retain_handling lhs, nl rhs)
 
constexpr subscribe_options operator| (retain_handling lhs, qos rhs)
 
constexpr subscribe_options operator| (rap lhs, retain_handling rhs)
 
constexpr subscribe_options operator| (rap lhs, nl rhs)
 
constexpr subscribe_options operator| (rap lhs, qos rhs)
 
constexpr subscribe_options operator| (nl lhs, retain_handling rhs)
 
constexpr subscribe_options operator| (nl lhs, rap rhs)
 
constexpr subscribe_options operator| (nl lhs, qos rhs)
 
constexpr subscribe_options operator| (qos lhs, retain_handling rhs)
 
constexpr subscribe_options operator| (qos lhs, rap rhs)
 
constexpr subscribe_options operator| (qos lhs, nl rhs)
 
constexpr char const * retain_handling_to_str (retain_handling v)
 
std::ostream & operator<< (std::ostream &os, retain_handling val)
 
constexpr char const * rap_to_str (rap v)
 
std::ostream & operator<< (std::ostream &os, rap val)
 
constexpr char const * nl_to_str (nl v)
 
std::ostream & operator<< (std::ostream &os, nl val)
 
constexpr char const * qos_to_str (qos v)
 
std::ostream & operator<< (std::ostream &os, qos val)
 
std::shared_ptr< callable_overlay< sync_client< tcp_endpoint< as::ip::tcp::socket, as::io_context::strand > > > > make_sync_client (as::io_context &ioc, std::string host, std::string port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< sync_client< tcp_endpoint< as::ip::tcp::socket, as::io_context::strand > > > > make_sync_client (as::io_context &ioc, std::string host, std::uint16_t port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< sync_client< tcp_endpoint< as::ip::tcp::socket, null_strand > > > > make_sync_client_no_strand (as::io_context &ioc, std::string host, std::string port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< sync_client< tcp_endpoint< as::ip::tcp::socket, null_strand > > > > make_sync_client_no_strand (as::io_context &ioc, std::string host, std::uint16_t port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< sync_client< tcp_endpoint< as::ip::tcp::socket, as::io_context::strand >, 4 > > > make_sync_client_32 (as::io_context &ioc, std::string host, std::string port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< sync_client< tcp_endpoint< as::ip::tcp::socket, as::io_context::strand >, 4 > > > make_sync_client_32 (as::io_context &ioc, std::string host, std::uint16_t port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< sync_client< tcp_endpoint< as::ip::tcp::socket, null_strand >, 4 > > > make_sync_client_no_strand_32 (as::io_context &ioc, std::string host, std::string port, protocol_version version=protocol_version::v3_1_1)
 
std::shared_ptr< callable_overlay< sync_client< tcp_endpoint< as::ip::tcp::socket, null_strand >, 4 > > > make_sync_client_no_strand_32 (as::io_context &ioc, std::string host, std::uint16_t port, protocol_version version=protocol_version::v3_1_1)
 
void register_topic_alias (topic_alias_map_t &m, string_view topic, topic_alias_t alias)
 
std::string find_topic_by_alias (topic_alias_map_t const &m, topic_alias_t alias)
 
void clear_topic_alias (topic_alias_map_t &m)
 
boost::container::static_vector< char, 2 > num_to_2bytes (std::uint16_t val)
 
template<typename T >
void add_uint16_t_to_buf (T &buf, std::uint16_t num)
 
template<typename It >
constexpr std::uint16_t make_uint16_t (It b, It e)
 
std::string variable_bytes (std::size_t size)
 
template<typename Container >
void variable_push (Container &c, std::size_t size)
 
template<typename T >
constexpr std::tuple< std::size_t, std::size_t > variable_length (T const &bytes)
 
template<typename Iterator >
constexpr std::tuple< std::size_t, std::size_t > variable_length (Iterator b, Iterator e)
 
template<typename T , typename U >
decltype(auto) variant_get (U &&arg)
 
template<typename T >
decltype(auto) variant_idx (T const &arg)
 
template<typename Visitor , typename... Variants>
constexpr decltype(auto) visit (Visitor &&vis, Variants &&... vars)
 
template<typename... Lambdas>
lambda_visitor< Lambdas... > make_lambda_visitor (Lambdas &&... lambdas)
 

Typedef Documentation

◆ add_packet_id_to_buf

template<std::size_t PacketIdBytes>
using MQTT_NS::add_packet_id_to_buf = typedef add_two_or_four_byte_to_buf<PacketIdBytes>

◆ basic_message_variant

◆ basic_store_message_variant

template<std::size_t PacketIdBytes>
using MQTT_NS::basic_store_message_variant = typedef variant< v3_1_1::basic_publish_message<PacketIdBytes>, v3_1_1::basic_pubrel_message<PacketIdBytes>, v5::basic_publish_message<PacketIdBytes>, v5::basic_pubrel_message<PacketIdBytes> >

◆ basic_string_view

template<class CharT , class Traits = std::char_traits<CharT>>
using MQTT_NS::basic_string_view = typedef boost::basic_string_ref<CharT, Traits>

◆ error_code

using MQTT_NS::error_code = typedef boost::system::error_code

◆ make_packet_id

template<std::size_t PacketIdBytes>
using MQTT_NS::make_packet_id = typedef make_two_or_four_byte<PacketIdBytes>

◆ message_variant

◆ nullopt_t

using MQTT_NS::nullopt_t = typedef boost::none_t

◆ packet_id_type

template<std::size_t PacketIdBytes>
using MQTT_NS::packet_id_type = typedef two_or_four_byte_type<PacketIdBytes>

◆ session_expiry_interval_t

using MQTT_NS::session_expiry_interval_t = typedef std::uint32_t

◆ store_message_variant

◆ string_view

using MQTT_NS::string_view = typedef boost::string_ref

◆ time_point_t

using MQTT_NS::time_point_t = typedef std::chrono::time_point<std::chrono::steady_clock>

◆ topic_alias_map_t

using MQTT_NS::topic_alias_map_t = typedef std::map<topic_alias_t, std::string>

◆ topic_alias_t

using MQTT_NS::topic_alias_t = typedef std::uint16_t

Enumeration Type Documentation

◆ connect_return_code

enum MQTT_NS::connect_return_code : std::uint8_t
strong
Enumerator
accepted 
unacceptable_protocol_version 
identifier_rejected 
server_unavailable 
bad_user_name_or_password 
not_authorized 

◆ control_packet_reserved_bits

enum MQTT_NS::control_packet_reserved_bits : std::uint8_t
strong
Enumerator
connect 
connack 
puback 
pubrec 
pubrel 
pubcomp 
subscribe 
suback 
unsubscribe 
unsuback 
pingreq 
pingresp 
disconnect 
auth 

◆ control_packet_type

enum MQTT_NS::control_packet_type : std::uint8_t
strong
Enumerator
connect 
connack 
publish 
puback 
pubrec 
pubrel 
pubcomp 
subscribe 
suback 
unsubscribe 
unsuback 
pingreq 
pingresp 
disconnect 
auth 

◆ dup

enum MQTT_NS::dup : std::uint8_t
strong
Enumerator
yes 
no 

◆ nl

enum MQTT_NS::nl : std::uint8_t
strong
Enumerator
no 
yes 

◆ protocol_version

Enumerator
undetermined 
v3_1_1 
v5 

◆ qos

enum MQTT_NS::qos : std::uint8_t
strong
Enumerator
at_most_once 
at_least_once 
exactly_once 

◆ rap

enum MQTT_NS::rap : std::uint8_t
strong
Enumerator
dont 
retain 

◆ retain

enum MQTT_NS::retain : std::uint8_t
strong
Enumerator
yes 
no 

◆ retain_handling

enum MQTT_NS::retain_handling : std::uint8_t
strong
Enumerator
send 
send_only_new_subscription 
not_send 

◆ severity_level

Enumerator
trace 
debug 
info 
warning 
error 
fatal 

◆ suback_return_code

enum MQTT_NS::suback_return_code : std::uint8_t
strong
Enumerator
success_maximum_qos_0 
success_maximum_qos_1 
success_maximum_qos_2 
failure 

Function Documentation

◆ add_uint16_t_to_buf()

template<typename T >
void MQTT_NS::add_uint16_t_to_buf ( T &  buf,
std::uint16_t  num 
)
inline

◆ add_uint32_t_to_buf()

template<typename T >
void MQTT_NS::add_uint32_t_to_buf ( T &  buf,
std::uint32_t  num 
)
inline

◆ allocate_buffer() [1/2]

template<typename Iterator >
buffer MQTT_NS::allocate_buffer ( Iterator  b,
Iterator  e 
)
inline

create buffer from the pair of iterators It copies string that from b to e into shared_ptr_array. Then create buffer and return it. The buffer holds the lifetime of shared_ptr_array.

Parameters
bbegin position iterator
eend position iterator
Returns
buffer

◆ allocate_buffer() [2/2]

buffer MQTT_NS::allocate_buffer ( string_view  sv)
inline

create buffer from the string_view It copies string that from string_view into shared_ptr_array. Then create buffer and return it. The buffer holds the lifetime of shared_ptr_array.

Parameters
svthe source string_view
Returns
buffer

◆ buffer_sequence_begin() [1/2]

buffer const* MQTT_NS::buffer_sequence_begin ( buffer const &  buf)
inline

◆ buffer_sequence_begin() [2/2]

template<typename Col >
Col::const_iterator MQTT_NS::buffer_sequence_begin ( Col const &  col)
inline

◆ buffer_sequence_end() [1/2]

buffer const* MQTT_NS::buffer_sequence_end ( buffer const &  buf)
inline

◆ buffer_sequence_end() [2/2]

template<typename Col >
Col::const_iterator MQTT_NS::buffer_sequence_end ( Col const &  col)
inline

◆ clear_topic_alias()

void MQTT_NS::clear_topic_alias ( topic_alias_map_t m)
inline

◆ connect_return_code_to_str()

constexpr char const* MQTT_NS::connect_return_code_to_str ( connect_return_code  v)
constexpr

◆ const_buffer_sequence()

template<std::size_t PacketIdBytes>
std::vector<as::const_buffer> MQTT_NS::const_buffer_sequence ( basic_message_variant< PacketIdBytes > const &  mv)
inline

◆ continuous_buffer() [1/2]

template<std::size_t PacketIdBytes>
std::string MQTT_NS::continuous_buffer ( basic_message_variant< PacketIdBytes > const &  mv)
inline

◆ continuous_buffer() [2/2]

template<std::size_t PacketIdBytes>
std::string MQTT_NS::continuous_buffer ( basic_store_message_variant< PacketIdBytes > const &  mv)
inline

◆ control_packet_type_to_str()

constexpr char const* MQTT_NS::control_packet_type_to_str ( control_packet_type  v)
constexpr

◆ create_topic_filter_buffer() [1/2]

buffer MQTT_NS::create_topic_filter_buffer ( string_view  share_name,
buffer  topic_filter 
)
inline

◆ create_topic_filter_buffer() [2/2]

buffer MQTT_NS::create_topic_filter_buffer ( string_view  share_name,
string_view  topic_filter 
)
inline

◆ dup_to_str()

constexpr char const* MQTT_NS::dup_to_str ( dup  v)
constexpr

◆ find_topic_by_alias()

std::string MQTT_NS::find_topic_by_alias ( topic_alias_map_t const &  m,
topic_alias_t  alias 
)
inline

◆ force_move()

template<typename T >
constexpr std::remove_reference_t<T>&& MQTT_NS::force_move ( T &&  t)
constexpr

◆ get_basic_message_variant()

template<std::size_t PacketIdBytes>
basic_message_variant<PacketIdBytes> MQTT_NS::get_basic_message_variant ( basic_store_message_variant< PacketIdBytes >  smv)
inline

◆ get_control_packet_type()

constexpr control_packet_type MQTT_NS::get_control_packet_type ( std::uint8_t  v)
constexpr

◆ get_control_packet_type_with_check()

optional<control_packet_type> MQTT_NS::get_control_packet_type_with_check ( std::uint8_t  v)
inline

◆ get_pointer()

char const* MQTT_NS::get_pointer ( as::const_buffer const &  cb)
inline

◆ get_size()

std::size_t MQTT_NS::get_size ( as::const_buffer const &  cb)
inline

◆ hexdump()

template<typename T >
void MQTT_NS::hexdump ( std::ostream &  os,
T const &  v 
)
inline

◆ is_session_present()

constexpr bool MQTT_NS::is_session_present ( char  v)
constexpr

◆ make_async_client() [1/2]

std::shared_ptr<callable_overlay<async_client<tcp_endpoint<as::ip::tcp::socket, as::io_context::strand> > > > MQTT_NS::make_async_client ( as::io_context &  ioc,
std::string  host,
std::string  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline
Parameters
iocio_context object.
hosthostname
portport number
Returns
async_client object

◆ make_async_client() [2/2]

std::shared_ptr<callable_overlay<async_client<tcp_endpoint<as::ip::tcp::socket, as::io_context::strand> > > > MQTT_NS::make_async_client ( as::io_context &  ioc,
std::string  host,
std::uint16_t  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline

◆ make_async_client_32() [1/2]

std::shared_ptr<callable_overlay<async_client<tcp_endpoint<as::ip::tcp::socket, as::io_context::strand>, 4> > > MQTT_NS::make_async_client_32 ( as::io_context &  ioc,
std::string  host,
std::string  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline
Parameters
iocio_context object.
hosthostname
portport number
Returns
async_client object

◆ make_async_client_32() [2/2]

std::shared_ptr<callable_overlay<async_client<tcp_endpoint<as::ip::tcp::socket, as::io_context::strand>, 4> > > MQTT_NS::make_async_client_32 ( as::io_context &  ioc,
std::string  host,
std::uint16_t  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline

◆ make_async_client_no_strand() [1/2]

std::shared_ptr<callable_overlay<async_client<tcp_endpoint<as::ip::tcp::socket, null_strand> > > > MQTT_NS::make_async_client_no_strand ( as::io_context &  ioc,
std::string  host,
std::string  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline
Parameters
iocio_context object.
hosthostname
portport number
Returns
async_client object

◆ make_async_client_no_strand() [2/2]

std::shared_ptr<callable_overlay<async_client<tcp_endpoint<as::ip::tcp::socket, null_strand> > > > MQTT_NS::make_async_client_no_strand ( as::io_context &  ioc,
std::string  host,
std::uint16_t  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline

◆ make_async_client_no_strand_32() [1/2]

std::shared_ptr<callable_overlay<async_client<tcp_endpoint<as::ip::tcp::socket, null_strand>, 4> > > MQTT_NS::make_async_client_no_strand_32 ( as::io_context &  ioc,
std::string  host,
std::string  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline
Parameters
iocio_context object.
hosthostname
portport number
Returns
async_client object

◆ make_async_client_no_strand_32() [2/2]

std::shared_ptr<callable_overlay<async_client<tcp_endpoint<as::ip::tcp::socket, null_strand>, 4> > > MQTT_NS::make_async_client_no_strand_32 ( as::io_context &  ioc,
std::string  host,
std::uint16_t  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline

◆ make_client() [1/2]

std::shared_ptr<callable_overlay<client<tcp_endpoint<as::ip::tcp::socket, as::io_context::strand> > > > MQTT_NS::make_client ( as::io_context &  ioc,
std::string  host,
std::string  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline
Parameters
iocio_context object.
hosthostname
portport number
Returns
client object

◆ make_client() [2/2]

std::shared_ptr<callable_overlay<client<tcp_endpoint<as::ip::tcp::socket, as::io_context::strand> > > > MQTT_NS::make_client ( as::io_context &  ioc,
std::string  host,
std::uint16_t  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline

◆ make_client_32() [1/2]

std::shared_ptr<callable_overlay<client<tcp_endpoint<as::ip::tcp::socket, as::io_context::strand>, 4> > > MQTT_NS::make_client_32 ( as::io_context &  ioc,
std::string  host,
std::string  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline
Parameters
iocio_context object.
hosthostname
portport number
Returns
client object

◆ make_client_32() [2/2]

std::shared_ptr<callable_overlay<client<tcp_endpoint<as::ip::tcp::socket, as::io_context::strand>, 4> > > MQTT_NS::make_client_32 ( as::io_context &  ioc,
std::string  host,
std::uint16_t  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline

◆ make_client_no_strand() [1/2]

std::shared_ptr<callable_overlay<client<tcp_endpoint<as::ip::tcp::socket, null_strand> > > > MQTT_NS::make_client_no_strand ( as::io_context &  ioc,
std::string  host,
std::string  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline
Parameters
iocio_context object.
hosthostname
portport number
Returns
client object

◆ make_client_no_strand() [2/2]

std::shared_ptr<callable_overlay<client<tcp_endpoint<as::ip::tcp::socket, null_strand> > > > MQTT_NS::make_client_no_strand ( as::io_context &  ioc,
std::string  host,
std::uint16_t  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline

◆ make_client_no_strand_32() [1/2]

std::shared_ptr<callable_overlay<client<tcp_endpoint<as::ip::tcp::socket, null_strand>, 4> > > MQTT_NS::make_client_no_strand_32 ( as::io_context &  ioc,
std::string  host,
std::string  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline
Parameters
iocio_context object.
hosthostname
portport number
Returns
client object

◆ make_client_no_strand_32() [2/2]

std::shared_ptr<callable_overlay<client<tcp_endpoint<as::ip::tcp::socket, null_strand>, 4> > > MQTT_NS::make_client_no_strand_32 ( as::io_context &  ioc,
std::string  host,
std::uint16_t  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline

◆ make_fixed_header()

constexpr std::uint8_t MQTT_NS::make_fixed_header ( control_packet_type  type,
std::uint8_t  flags 
)
constexpr

◆ make_lambda_visitor()

template<typename... Lambdas>
lambda_visitor<Lambdas...> MQTT_NS::make_lambda_visitor ( Lambdas &&...  lambdas)
inline

◆ make_sync_client() [1/2]

std::shared_ptr<callable_overlay<sync_client<tcp_endpoint<as::ip::tcp::socket, as::io_context::strand> > > > MQTT_NS::make_sync_client ( as::io_context &  ioc,
std::string  host,
std::string  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline
Parameters
iocio_context object.
hosthostname
portport number
Returns
sync_client object

◆ make_sync_client() [2/2]

std::shared_ptr<callable_overlay<sync_client<tcp_endpoint<as::ip::tcp::socket, as::io_context::strand> > > > MQTT_NS::make_sync_client ( as::io_context &  ioc,
std::string  host,
std::uint16_t  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline

◆ make_sync_client_32() [1/2]

std::shared_ptr<callable_overlay<sync_client<tcp_endpoint<as::ip::tcp::socket, as::io_context::strand>, 4> > > MQTT_NS::make_sync_client_32 ( as::io_context &  ioc,
std::string  host,
std::string  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline
Parameters
iocio_context object.
hosthostname
portport number
Returns
sync_client object

◆ make_sync_client_32() [2/2]

std::shared_ptr<callable_overlay<sync_client<tcp_endpoint<as::ip::tcp::socket, as::io_context::strand>, 4> > > MQTT_NS::make_sync_client_32 ( as::io_context &  ioc,
std::string  host,
std::uint16_t  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline

◆ make_sync_client_no_strand() [1/2]

std::shared_ptr<callable_overlay<sync_client<tcp_endpoint<as::ip::tcp::socket, null_strand> > > > MQTT_NS::make_sync_client_no_strand ( as::io_context &  ioc,
std::string  host,
std::string  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline
Parameters
iocio_context object.
hosthostname
portport number
Returns
sync_client object

◆ make_sync_client_no_strand() [2/2]

std::shared_ptr<callable_overlay<sync_client<tcp_endpoint<as::ip::tcp::socket, null_strand> > > > MQTT_NS::make_sync_client_no_strand ( as::io_context &  ioc,
std::string  host,
std::uint16_t  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline

◆ make_sync_client_no_strand_32() [1/2]

std::shared_ptr<callable_overlay<sync_client<tcp_endpoint<as::ip::tcp::socket, null_strand>, 4> > > MQTT_NS::make_sync_client_no_strand_32 ( as::io_context &  ioc,
std::string  host,
std::string  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline
Parameters
iocio_context object.
hosthostname
portport number
Returns
sync_client object

◆ make_sync_client_no_strand_32() [2/2]

std::shared_ptr<callable_overlay<sync_client<tcp_endpoint<as::ip::tcp::socket, null_strand>, 4> > > MQTT_NS::make_sync_client_no_strand_32 ( as::io_context &  ioc,
std::string  host,
std::uint16_t  port,
protocol_version  version = protocol_version::v3_1_1 
)
inline

◆ make_uint16_t()

template<typename It >
constexpr std::uint16_t MQTT_NS::make_uint16_t ( It  b,
It  e 
)
constexpr

◆ make_uint32_t()

template<typename It >
constexpr std::uint32_t MQTT_NS::make_uint32_t ( It  b,
It  e 
)
constexpr

◆ nl_to_str()

constexpr char const* MQTT_NS::nl_to_str ( nl  v)
constexpr

◆ num_of_const_buffer_sequence()

template<std::size_t PacketIdBytes>
std::size_t MQTT_NS::num_of_const_buffer_sequence ( basic_message_variant< PacketIdBytes > const &  mv)
inline

◆ num_to_2bytes()

boost::container::static_vector<char, 2> MQTT_NS::num_to_2bytes ( std::uint16_t  val)
inline

◆ num_to_4bytes()

boost::container::static_vector<char, 4> MQTT_NS::num_to_4bytes ( std::uint32_t  val)
inline

◆ operator!=() [1/2]

bool MQTT_NS::operator!= ( null_strand const &  lhs,
null_strand const &  rhs 
)
inline

◆ operator!=() [2/2]

bool MQTT_NS::operator!= ( share_name_topic_filter const &  lhs,
share_name_topic_filter const &  rhs 
)
inline

◆ operator<()

bool MQTT_NS::operator< ( share_name_topic_filter const &  lhs,
share_name_topic_filter const &  rhs 
)
inline

◆ operator<<() [1/11]

std::ostream& MQTT_NS::operator<< ( std::ostream &  o,
severity_level  sev 
)
inline

◆ operator<<() [2/11]

std::ostream& MQTT_NS::operator<< ( std::ostream &  os,
connect_return_code  val 
)
inline

◆ operator<<() [3/11]

std::ostream& MQTT_NS::operator<< ( std::ostream &  os,
control_packet_type  val 
)
inline

◆ operator<<() [4/11]

std::ostream& MQTT_NS::operator<< ( std::ostream &  os,
dup  val 
)
inline

◆ operator<<() [5/11]

std::ostream& MQTT_NS::operator<< ( std::ostream &  os,
nl  val 
)
inline

◆ operator<<() [6/11]

std::ostream& MQTT_NS::operator<< ( std::ostream &  os,
protocol_version  val 
)
inline

◆ operator<<() [7/11]

std::ostream& MQTT_NS::operator<< ( std::ostream &  os,
qos  val 
)
inline

◆ operator<<() [8/11]

std::ostream& MQTT_NS::operator<< ( std::ostream &  os,
rap  val 
)
inline

◆ operator<<() [9/11]

std::ostream& MQTT_NS::operator<< ( std::ostream &  os,
retain  val 
)
inline

◆ operator<<() [10/11]

std::ostream& MQTT_NS::operator<< ( std::ostream &  os,
retain_handling  val 
)
inline

◆ operator<<() [11/11]

std::ostream& MQTT_NS::operator<< ( std::ostream &  os,
suback_return_code  val 
)
inline

◆ operator==() [1/2]

bool MQTT_NS::operator== ( null_strand const &  lhs,
null_strand const &  rhs 
)
inline

◆ operator==() [2/2]

bool MQTT_NS::operator== ( share_name_topic_filter const &  lhs,
share_name_topic_filter const &  rhs 
)
inline

◆ operator|() [1/18]

constexpr publish_options MQTT_NS::operator| ( dup  lhs,
qos  rhs 
)
constexpr

◆ operator|() [2/18]

constexpr publish_options MQTT_NS::operator| ( dup  lhs,
retain  rhs 
)
constexpr

◆ operator|() [3/18]

constexpr subscribe_options MQTT_NS::operator| ( nl  lhs,
qos  rhs 
)
constexpr

◆ operator|() [4/18]

constexpr subscribe_options MQTT_NS::operator| ( nl  lhs,
rap  rhs 
)
constexpr

◆ operator|() [5/18]

constexpr subscribe_options MQTT_NS::operator| ( nl  lhs,
retain_handling  rhs 
)
constexpr

◆ operator|() [6/18]

constexpr publish_options MQTT_NS::operator| ( qos  lhs,
dup  rhs 
)
constexpr

◆ operator|() [7/18]

constexpr subscribe_options MQTT_NS::operator| ( qos  lhs,
nl  rhs 
)
constexpr

◆ operator|() [8/18]

constexpr subscribe_options MQTT_NS::operator| ( qos  lhs,
rap  rhs 
)
constexpr

◆ operator|() [9/18]

constexpr publish_options MQTT_NS::operator| ( qos  lhs,
retain  rhs 
)
constexpr

◆ operator|() [10/18]

constexpr subscribe_options MQTT_NS::operator| ( qos  lhs,
retain_handling  rhs 
)
constexpr

◆ operator|() [11/18]

constexpr subscribe_options MQTT_NS::operator| ( rap  lhs,
nl  rhs 
)
constexpr

◆ operator|() [12/18]

constexpr subscribe_options MQTT_NS::operator| ( rap  lhs,
qos  rhs 
)
constexpr

◆ operator|() [13/18]

constexpr subscribe_options MQTT_NS::operator| ( rap  lhs,
retain_handling  rhs 
)
constexpr

◆ operator|() [14/18]

constexpr publish_options MQTT_NS::operator| ( retain  lhs,
dup  rhs 
)
constexpr

◆ operator|() [15/18]

constexpr publish_options MQTT_NS::operator| ( retain  lhs,
qos  rhs 
)
constexpr

◆ operator|() [16/18]

constexpr subscribe_options MQTT_NS::operator| ( retain_handling  lhs,
nl  rhs 
)
constexpr

◆ operator|() [17/18]

constexpr subscribe_options MQTT_NS::operator| ( retain_handling  lhs,
qos  rhs 
)
constexpr

◆ operator|() [18/18]

constexpr subscribe_options MQTT_NS::operator| ( retain_handling  lhs,
rap  rhs 
)
constexpr

◆ parse_shared_subscription()

optional<share_name_topic_filter> MQTT_NS::parse_shared_subscription ( buffer  whole_topic_filter)
inline

◆ protocol_version_to_str()

constexpr char const* MQTT_NS::protocol_version_to_str ( protocol_version  v)
constexpr

◆ qos_to_str()

constexpr char const* MQTT_NS::qos_to_str ( qos  v)
constexpr

◆ qos_to_suback_return_code()

constexpr suback_return_code MQTT_NS::qos_to_suback_return_code ( qos  q)
constexpr

◆ rap_to_str()

constexpr char const* MQTT_NS::rap_to_str ( rap  v)
constexpr

◆ register_topic_alias()

void MQTT_NS::register_topic_alias ( topic_alias_map_t m,
string_view  topic,
topic_alias_t  alias 
)
inline

◆ remaining_bytes()

std::string MQTT_NS::remaining_bytes ( std::size_t  size)
inline

◆ remaining_length() [1/2]

template<typename Iterator >
constexpr std::tuple<std::size_t, std::size_t> MQTT_NS::remaining_length ( Iterator  b,
Iterator  e 
)
constexpr

◆ remaining_length() [2/2]

constexpr std::tuple<std::size_t, std::size_t> MQTT_NS::remaining_length ( string_view  bytes)
constexpr

◆ retain_handling_to_str()

constexpr char const* MQTT_NS::retain_handling_to_str ( retain_handling  v)
constexpr

◆ retain_to_str()

constexpr char const* MQTT_NS::retain_to_str ( retain  v)
constexpr

◆ setup_log()

template<typename... Params>
void MQTT_NS::setup_log ( Params &&  ...)

◆ shared_scope_guard()

template<typename Proc >
auto MQTT_NS::shared_scope_guard ( Proc &&  proc)
inline

◆ size()

template<std::size_t PacketIdBytes>
std::size_t MQTT_NS::size ( basic_message_variant< PacketIdBytes > const &  mv)
inline

◆ suback_return_code_to_str()

constexpr char const* MQTT_NS::suback_return_code_to_str ( suback_return_code  v)
constexpr

◆ utf8string_check() [1/2]

void MQTT_NS::utf8string_check ( as::const_buffer  str)
inline

◆ utf8string_check() [2/2]

void MQTT_NS::utf8string_check ( string_view  str)
inline

◆ variable_bytes()

std::string MQTT_NS::variable_bytes ( std::size_t  size)
inline

◆ variable_length() [1/2]

template<typename Iterator >
constexpr std::tuple<std::size_t, std::size_t> MQTT_NS::variable_length ( Iterator  b,
Iterator  e 
)
constexpr

◆ variable_length() [2/2]

template<typename T >
constexpr std::tuple<std::size_t, std::size_t> MQTT_NS::variable_length ( T const &  bytes)
constexpr

◆ variable_push()

template<typename Container >
void MQTT_NS::variable_push ( Container &  c,
std::size_t  size 
)
inline

◆ variant_get()

template<typename T , typename U >
decltype(auto) MQTT_NS::variant_get ( U &&  arg)

◆ variant_idx()

template<typename T >
decltype(auto) MQTT_NS::variant_idx ( T const &  arg)

◆ visit()

template<typename Visitor , typename... Variants>
constexpr decltype(auto) MQTT_NS::visit ( Visitor &&  vis,
Variants &&...  vars 
)
constexpr