Skip to content
Takatoshi Kondo edited this page Aug 28, 2019 · 12 revisions

#Configuration Macros

MQTT_NO_TLS

If you define MQTT_NO_TLS macro, mqtt_cpp disables TLS features. So you don't need to prepare OpenSSL.

MQTT_USE_WS

If you define MQTT_USE_WS macro, mqtt_cpp supports WebSocket using Beast.

Update: Since the Boost Libraries version 1.66.0, it contains the Beast.

MQTT_STD_OPTIONAL

If you define MQTT_STD_OPTIONAL macro, mqtt_cpp use std::optional instead of boost::optional.

MQTT_STD_VARIANT

If you define MQTT_STD_VARIANT macro, mqtt_cpp use std::variant instead of boost::variant.

MQTT_STD_STRING_VIEW

If you define MQTT_STD_STRING_VIEW macro, mqtt_cpp use std::string_view instead of boost::string_view.

Note: If you don't define MQTT_STD_STRING_VIEW and Boost version is less than 1.61.0, then boost::string_ref is used.

MQTT_NS

If you define MQTT_NS macro with a string, the string is used as the namespace of mqtt_cpp. If you don't define it, then mqtt is used as the namespace of mqtt_cpp.

Clone this wiki locally