forked from boostorg/mqtt5
#includes revision and housekeeping
Summary: related to T13767 Reviewers: ivica Reviewed By: ivica Subscribers: iljazovic, miljen Differential Revision: https://repo.mireo.local/D31700
This commit is contained in:
@ -29,7 +29,7 @@ struct tls_handshake_type<boost::asio::ssl::stream<StreamBase>> {
|
||||
template <typename StreamBase>
|
||||
void assign_tls_sni(
|
||||
const authority_path& ap,
|
||||
boost::asio::ssl::context& ctx,
|
||||
boost::asio::ssl::context& /* ctx */,
|
||||
boost::asio::ssl::stream<StreamBase>& stream
|
||||
) {
|
||||
SSL_set_tlsext_host_name(stream.native_handle(), ap.host.c_str());
|
||||
|
@ -6,8 +6,10 @@
|
||||
//
|
||||
|
||||
//[publisher
|
||||
#include <chrono>
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include <boost/asio/as_tuple.hpp>
|
||||
#include <boost/asio/co_spawn.hpp>
|
||||
|
@ -6,6 +6,7 @@
|
||||
//
|
||||
|
||||
//[timeout_with_awaitable_operators
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
|
||||
#include <boost/asio/as_tuple.hpp>
|
||||
|
@ -6,10 +6,15 @@
|
||||
//
|
||||
|
||||
//[timeout_with_parallel_group
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/deferred.hpp>
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
#include <boost/asio/experimental/parallel_group.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
@ -8,8 +8,14 @@
|
||||
#ifndef ASYNC_MQTT5_ANY_AUTHENTICATOR
|
||||
#define ASYNC_MQTT5_ANY_AUTHENTICATOR
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/asio/any_completion_handler.hpp>
|
||||
#include <boost/asio/async_result.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#include <boost/type_traits/is_detected.hpp>
|
||||
#include <boost/type_traits/is_detected_convertible.hpp>
|
||||
@ -22,7 +28,7 @@ namespace asio = boost::asio;
|
||||
using error_code = boost::system::error_code;
|
||||
|
||||
using auth_handler_type = asio::any_completion_handler<
|
||||
void (error_code ec, std::string auth_data)
|
||||
void (error_code, std::string)
|
||||
>;
|
||||
|
||||
template <typename T, typename ...Ts>
|
||||
|
@ -8,13 +8,19 @@
|
||||
#ifndef ASYNC_MQTT5_ASYNC_MUTEX_HPP
|
||||
#define ASYNC_MQTT5_ASYNC_MUTEX_HPP
|
||||
|
||||
#include <atomic>
|
||||
#include <deque>
|
||||
#include <mutex>
|
||||
|
||||
#include <boost/asio/any_completion_handler.hpp>
|
||||
#include <boost/asio/any_io_executor.hpp>
|
||||
#include <boost/asio/associated_allocator.hpp>
|
||||
#include <boost/asio/associated_cancellation_slot.hpp>
|
||||
#include <boost/asio/async_result.hpp>
|
||||
#include <boost/asio/bind_cancellation_slot.hpp>
|
||||
#include <boost/asio/execution.hpp>
|
||||
#include <boost/asio/require.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/async_traits.hpp>
|
||||
#include <async_mqtt5/detail/spinlock.hpp>
|
||||
|
@ -9,6 +9,7 @@
|
||||
#define ASYNC_MQTT5_CHANNEL_TRAITS_HPP
|
||||
|
||||
#include <deque>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/asio/error.hpp>
|
||||
|
||||
|
@ -9,6 +9,10 @@
|
||||
#define ASYNC_MQTT5_CONTROL_PACKET_HPP
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/smart_ptr/allocate_unique.hpp>
|
||||
|
@ -8,9 +8,10 @@
|
||||
#ifndef ASYNC_MQTT5_INTERNAL_TYPES_HPP
|
||||
#define ASYNC_MQTT5_INTERNAL_TYPES_HPP
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <shared_mutex>
|
||||
|
||||
#include <async_mqtt5/detail/any_authenticator.hpp>
|
||||
|
||||
|
@ -8,7 +8,8 @@
|
||||
#ifndef ASYNC_MQTT5_TOPIC_VALIDATION_HPP
|
||||
#define ASYNC_MQTT5_TOPIC_VALIDATION_HPP
|
||||
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include <string_view>
|
||||
|
||||
#include <async_mqtt5/detail/utf8_mqtt.hpp>
|
||||
|
||||
|
@ -8,7 +8,10 @@
|
||||
#ifndef ASYNC_MQTT5_UTF8_MQTT_HPP
|
||||
#define ASYNC_MQTT5_UTF8_MQTT_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
|
||||
|
@ -8,6 +8,10 @@
|
||||
#ifndef ASYNC_MQTT5_ERROR_HPP
|
||||
#define ASYNC_MQTT5_ERROR_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
|
||||
#include <boost/asio/error.hpp>
|
||||
|
||||
namespace async_mqtt5 {
|
||||
|
@ -8,15 +8,18 @@
|
||||
#ifndef ASYNC_MQTT5_ASSEMBLE_OP_HPP
|
||||
#define ASYNC_MQTT5_ASSEMBLE_OP_HPP
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include <boost/asio/append.hpp>
|
||||
#include <boost/asio/associated_allocator.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
#include <boost/asio/completion_condition.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#include <async_mqtt5/error.hpp>
|
||||
|
||||
|
@ -8,13 +8,21 @@
|
||||
#ifndef ASYNC_MQTT5_ASYNC_SENDER_HPP
|
||||
#define ASYNC_MQTT5_ASYNC_SENDER_HPP
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/asio/any_completion_handler.hpp>
|
||||
#include <boost/asio/any_io_executor.hpp>
|
||||
#include <boost/asio/bind_allocator.hpp>
|
||||
#include <boost/asio/bind_executor.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/asio/recycling_allocator.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
|
@ -8,9 +8,15 @@
|
||||
#ifndef ASYNC_MQTT5_AUTOCONNECT_STREAM_HPP
|
||||
#define ASYNC_MQTT5_AUTOCONNECT_STREAM_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include <boost/asio/async_result.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/async_mutex.hpp>
|
||||
#include <async_mqtt5/detail/async_traits.hpp>
|
||||
|
@ -8,11 +8,20 @@
|
||||
#ifndef ASYNC_MQTT5_CLIENT_SERVICE_HPP
|
||||
#define ASYNC_MQTT5_CLIENT_SERVICE_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/asio/async_result.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/experimental/basic_channel.hpp>
|
||||
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/channel_traits.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
@ -24,7 +33,6 @@
|
||||
#include <async_mqtt5/impl/replies.hpp>
|
||||
#include <async_mqtt5/impl/sentry_op.hpp>
|
||||
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
|
||||
namespace asio = boost::asio;
|
||||
|
@ -8,9 +8,15 @@
|
||||
#ifndef ASYNC_MQTT5_BASE_DECODERS_HPP
|
||||
#define ASYNC_MQTT5_BASE_DECODERS_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include <boost/spirit/home/x3.hpp>
|
||||
#include <boost/spirit/home/x3/binary/binary.hpp>
|
||||
#include <boost/fusion/adapted/std_tuple.hpp>
|
||||
#include <boost/fusion/container/deque.hpp>
|
||||
#include <boost/optional/optional.hpp>
|
||||
|
||||
#include <async_mqtt5/property_types.hpp>
|
||||
#include <async_mqtt5/impl/codecs/traits.hpp>
|
||||
|
@ -10,6 +10,9 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#include <boost/core/identity.hpp>
|
||||
#include <boost/endian/conversion.hpp>
|
||||
|
@ -9,8 +9,12 @@
|
||||
#define ASYNC_MQTT5_MESSAGE_DECODERS_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <async_mqtt5/types.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
#include <async_mqtt5/impl/codecs/base_decoders.hpp>
|
||||
|
||||
|
@ -8,8 +8,11 @@
|
||||
#ifndef ASYNC_MQTT5_MESSAGE_ENCODERS_HPP
|
||||
#define ASYNC_MQTT5_MESSAGE_ENCODERS_HPP
|
||||
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include <async_mqtt5/types.hpp>
|
||||
#include <async_mqtt5/impl/codecs/base_encoders.hpp>
|
||||
|
@ -10,12 +10,12 @@
|
||||
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
|
||||
#include <boost/container/small_vector.hpp>
|
||||
#include <boost/range/iterator_range_core.hpp>
|
||||
#include <boost/type_traits/remove_cv_ref.hpp>
|
||||
|
||||
|
||||
namespace async_mqtt5 {
|
||||
|
||||
template <typename>
|
||||
@ -58,8 +58,6 @@ constexpr bool is_boost_iterator = is_specialization<
|
||||
boost::remove_cv_ref_t<T>, boost::iterator_range
|
||||
>;
|
||||
|
||||
|
||||
|
||||
} // end namespace async_mqtt5
|
||||
|
||||
#endif // !ASYNC_MQTT5_TRAITS_HPP
|
||||
|
@ -8,6 +8,11 @@
|
||||
#ifndef ASYNC_MQTT5_CONNECT_OP_HPP
|
||||
#define ASYNC_MQTT5_CONNECT_OP_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <boost/asio/any_completion_handler.hpp>
|
||||
#include <boost/asio/append.hpp>
|
||||
#include <boost/asio/associated_allocator.hpp>
|
||||
#include <boost/asio/associated_executor.hpp>
|
||||
@ -16,11 +21,11 @@
|
||||
#include <boost/asio/consign.hpp>
|
||||
#include <boost/asio/completion_condition.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/read.hpp>
|
||||
#include <boost/asio/write.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/asio/any_completion_handler.hpp>
|
||||
|
||||
#include <boost/beast/http/field.hpp>
|
||||
#include <boost/beast/websocket/rfc6455.hpp>
|
||||
@ -74,8 +79,8 @@ public:
|
||||
_handler(std::forward<Handler>(handler)),
|
||||
_cancellation_state(
|
||||
asio::get_associated_cancellation_slot(_handler),
|
||||
asio::enable_total_cancellation{},
|
||||
asio::enable_total_cancellation{}
|
||||
asio::enable_total_cancellation {},
|
||||
asio::enable_total_cancellation {}
|
||||
)
|
||||
{}
|
||||
|
||||
|
@ -8,11 +8,17 @@
|
||||
#ifndef ASYNC_MQTT5_DISCONNECT_OP_HPP
|
||||
#define ASYNC_MQTT5_DISCONNECT_OP_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
#include <boost/asio/any_completion_handler.hpp>
|
||||
#include <boost/asio/associated_allocator.hpp>
|
||||
#include <boost/asio/associated_executor.hpp>
|
||||
#include <boost/asio/associated_cancellation_slot.hpp>
|
||||
#include <boost/asio/async_result.hpp>
|
||||
#include <boost/asio/consign.hpp>
|
||||
#include <boost/asio/deferred.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
#include <boost/asio/experimental/parallel_group.hpp>
|
||||
|
@ -8,12 +8,17 @@
|
||||
#ifndef ASYNC_MQTT5_ENDPOINTS_HPP
|
||||
#define ASYNC_MQTT5_ENDPOINTS_HPP
|
||||
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
|
||||
#include <boost/asio/append.hpp>
|
||||
#include <boost/asio/associated_allocator.hpp>
|
||||
#include <boost/asio/associated_executor.hpp>
|
||||
#include <boost/asio/associated_cancellation_slot.hpp>
|
||||
#include <boost/asio/async_result.hpp>
|
||||
#include <boost/asio/deferred.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
}
|
||||
|
||||
using cancellation_slot_type = asio::cancellation_slot;
|
||||
asio::cancellation_slot get_cancellation_slot() const noexcept {
|
||||
cancellation_slot_type get_cancellation_slot() const noexcept {
|
||||
return _cancellation_state.slot();
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,8 @@
|
||||
#ifndef ASYNC_MQTT5_PUBLISH_REC_OP_HPP
|
||||
#define ASYNC_MQTT5_PUBLISH_REC_OP_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
#include <boost/asio/consign.hpp>
|
||||
@ -18,6 +20,7 @@
|
||||
#include <async_mqtt5/error.hpp>
|
||||
#include <async_mqtt5/reason_codes.hpp>
|
||||
#include <async_mqtt5/property_types.hpp>
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
@ -8,8 +8,15 @@
|
||||
#ifndef ASYNC_MQTT5_PUBLISH_SEND_OP_HPP
|
||||
#define ASYNC_MQTT5_PUBLISH_SEND_OP_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/asio/associated_allocator.hpp>
|
||||
#include <boost/asio/associated_executor.hpp>
|
||||
#include <boost/asio/cancellation_type.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
|
||||
|
@ -8,18 +8,22 @@
|
||||
#ifndef ASYNC_MQTT5_RE_AUTH_OP_hpp
|
||||
#define ASYNC_MQTT5_RE_AUTH_OP_hpp
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/recycling_allocator.hpp>
|
||||
|
||||
#include <async_mqtt5/error.hpp>
|
||||
#include <async_mqtt5/reason_codes.hpp>
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
#include <async_mqtt5/detail/any_authenticator.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/codecs/message_decoders.hpp>
|
||||
#include <async_mqtt5/impl/codecs/message_encoders.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/disconnect_op.hpp>
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
|
@ -9,7 +9,10 @@
|
||||
#define ASYNC_MQTT5_READ_MESSAGE_OP_HPP
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/recycling_allocator.hpp>
|
||||
|
||||
|
@ -8,9 +8,12 @@
|
||||
#ifndef ASYNC_MQTT5_READ_OP_HPP
|
||||
#define ASYNC_MQTT5_READ_OP_HPP
|
||||
|
||||
#include <array>
|
||||
|
||||
#include <boost/asio/associated_allocator.hpp>
|
||||
#include <boost/asio/associated_executor.hpp>
|
||||
#include <boost/asio/deferred.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
|
||||
|
@ -8,14 +8,21 @@
|
||||
#ifndef ASYNC_MQTT5_RECONNECT_OP_HPP
|
||||
#define ASYNC_MQTT5_RECONNECT_OP_HPP
|
||||
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <boost/asio/any_completion_handler.hpp>
|
||||
#include <boost/asio/associated_allocator.hpp>
|
||||
#include <boost/asio/associated_executor.hpp>
|
||||
#include <boost/asio/associated_cancellation_slot.hpp>
|
||||
#include <boost/asio/async_result.hpp>
|
||||
#include <boost/asio/deferred.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/asio/any_completion_handler.hpp>
|
||||
#include <boost/asio/experimental/parallel_group.hpp>
|
||||
|
||||
#include <boost/random/linear_congruential.hpp>
|
||||
|
@ -8,14 +8,23 @@
|
||||
#ifndef ASYNC_MQTT5_REPLIES_HPP
|
||||
#define ASYNC_MQTT5_REPLIES_HPP
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/asio/any_completion_handler.hpp>
|
||||
#include <boost/asio/any_io_executor.hpp>
|
||||
#include <boost/asio/async_result.hpp>
|
||||
#include <boost/asio/consign.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
|
||||
#include <async_mqtt5/types.hpp>
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#define ASYNC_MQTT5_SENTRY_OP_HPP
|
||||
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
|
||||
#include <boost/asio/cancellation_signal.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
@ -61,7 +62,7 @@ public:
|
||||
}
|
||||
|
||||
using cancellation_slot_type = asio::cancellation_slot;
|
||||
asio::cancellation_slot get_cancellation_slot() const noexcept {
|
||||
cancellation_slot_type get_cancellation_slot() const noexcept {
|
||||
return _svc_ptr->_cancel_sentry.slot();
|
||||
}
|
||||
|
||||
|
@ -8,12 +8,18 @@
|
||||
#ifndef ASYNC_MQTT5_SUBSCRIBE_OP_HPP
|
||||
#define ASYNC_MQTT5_SUBSCRIBE_OP_HPP
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/asio/associated_allocator.hpp>
|
||||
#include <boost/asio/associated_cancellation_slot.hpp>
|
||||
#include <boost/asio/associated_executor.hpp>
|
||||
#include <boost/asio/cancellation_type.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
|
||||
#include <async_mqtt5/error.hpp>
|
||||
#include <async_mqtt5/reason_codes.hpp>
|
||||
|
@ -8,12 +8,22 @@
|
||||
#ifndef ASYNC_MQTT5_UNSUBSCRIBE_OP_HPP
|
||||
#define ASYNC_MQTT5_UNSUBSCRIBE_OP_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/asio/associated_allocator.hpp>
|
||||
#include <boost/asio/associated_cancellation_slot.hpp>
|
||||
#include <boost/asio/associated_executor.hpp>
|
||||
#include <boost/asio/cancellation_type.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
|
||||
#include <async_mqtt5/error.hpp>
|
||||
#include <async_mqtt5/reason_codes.hpp>
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/cancellable_handler.hpp>
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
@ -31,6 +41,7 @@ namespace asio = boost::asio;
|
||||
template <typename ClientService, typename Handler>
|
||||
class unsubscribe_op {
|
||||
using client_service = ClientService;
|
||||
|
||||
struct on_unsubscribe {};
|
||||
struct on_unsuback {};
|
||||
|
||||
|
@ -10,10 +10,11 @@
|
||||
|
||||
#include <boost/asio/associated_allocator.hpp>
|
||||
#include <boost/asio/associated_executor.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/write.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/async_traits.hpp>
|
||||
|
||||
|
@ -8,6 +8,12 @@
|
||||
#ifndef ASYNC_MQTT5_MQTT_CLIENT_HPP
|
||||
#define ASYNC_MQTT5_MQTT_CLIENT_HPP
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <variant> // std::monostate
|
||||
#include <vector>
|
||||
|
||||
#include <boost/asio/async_result.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
|
@ -9,8 +9,10 @@
|
||||
#define ASYNC_MQTT5_PROPERTY_TYPES_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
|
@ -9,8 +9,11 @@
|
||||
#define ASYNC_MQTT5_REASON_CODES_HPP
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <ostream>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
namespace async_mqtt5 {
|
||||
|
||||
|
@ -8,12 +8,16 @@
|
||||
#ifndef ASYNC_MQTT5_TEST_MESSAGE_EXCHANGE_HPP
|
||||
#define ASYNC_MQTT5_TEST_MESSAGE_EXCHANGE_HPP
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <deque>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/system/error_code.hpp>
|
||||
#include <boost/type_traits/remove_cv_ref.hpp>
|
||||
|
||||
#include "test_common/delayed_op.hpp"
|
||||
|
@ -9,19 +9,20 @@
|
||||
#define ASYNC_MQTT5_TEST_PACKET_UTIL_HPP
|
||||
|
||||
#include <bitset>
|
||||
#include <cstdint>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/algorithm/string/join.hpp>
|
||||
|
||||
#include <boost/asio/buffer.hpp>
|
||||
|
||||
#include <boost/range/algorithm/transform.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/codecs/message_decoders.hpp>
|
||||
#include <async_mqtt5/impl/codecs/message_encoders.hpp>
|
||||
#include <async_mqtt5/impl/codecs/traits.hpp>
|
||||
|
||||
namespace async_mqtt5::test {
|
||||
|
||||
|
@ -8,13 +8,16 @@
|
||||
#ifndef ASYNC_MQTT5_TEST_TEST_AUTHENTICATORS_HPP
|
||||
#define ASYNC_MQTT5_TEST_TEST_AUTHENTICATORS_HPP
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include <boost/asio/async_result.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace async_mqtt5::test {
|
||||
|
||||
namespace asio = boost::asio;
|
||||
|
@ -8,10 +8,14 @@
|
||||
#ifndef ASYNC_MQTT5_TEST_TEST_SERVICE_HPP
|
||||
#define ASYNC_MQTT5_TEST_TEST_SERVICE_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <variant>
|
||||
|
||||
#include <boost/asio/any_io_executor.hpp>
|
||||
#include <boost/asio/associated_executor.hpp>
|
||||
#include <boost/asio/async_result.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
@ -32,11 +36,11 @@ class test_service : public async_mqtt5::detail::client_service<StreamType, TlsC
|
||||
asio::any_io_executor _ex;
|
||||
connack_props _test_props;
|
||||
public:
|
||||
explicit test_service(const asio::any_io_executor ex)
|
||||
explicit test_service(const asio::any_io_executor& ex)
|
||||
: base(ex), _ex(ex)
|
||||
{}
|
||||
|
||||
test_service(const asio::any_io_executor ex, connack_props props)
|
||||
test_service(const asio::any_io_executor& ex, connack_props props)
|
||||
: base(ex), _ex(ex), _test_props(std::move(props))
|
||||
{}
|
||||
|
||||
@ -51,9 +55,9 @@ public:
|
||||
);
|
||||
};
|
||||
|
||||
return asio::async_initiate<
|
||||
CompletionToken, void (error_code)
|
||||
> (std::move(initiation), token);
|
||||
return asio::async_initiate<CompletionToken, void (error_code)>(
|
||||
std::move(initiation), token
|
||||
);
|
||||
}
|
||||
|
||||
template <typename Prop>
|
||||
|
@ -8,14 +8,19 @@
|
||||
#ifndef ASYNC_MQTT5_TEST_TEST_STREAM_HPP
|
||||
#define ASYNC_MQTT5_TEST_TEST_STREAM_HPP
|
||||
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
|
||||
#include <boost/asio/associated_executor.hpp>
|
||||
#include <boost/asio/async_result.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/execution_context.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
#include <boost/asio/recycling_allocator.hpp>
|
||||
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/cancellable_handler.hpp>
|
||||
|
||||
|
@ -5,12 +5,19 @@
|
||||
// (See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
|
||||
#include <async_mqtt5/mqtt_client.hpp>
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include "test_common/message_exchange.hpp"
|
||||
#include "test_common/test_service.hpp"
|
||||
@ -55,7 +62,7 @@ struct shared_test_data {
|
||||
};
|
||||
|
||||
using test::after;
|
||||
using namespace std::chrono;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE(publish_ordering_after_reconnect, shared_test_data) {
|
||||
constexpr int expected_handlers_called = 2;
|
||||
|
@ -5,6 +5,8 @@
|
||||
// (See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <boost/asio/as_tuple.hpp>
|
||||
@ -15,6 +17,7 @@
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
#include <boost/asio/use_awaitable.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
#include <async_mqtt5.hpp>
|
||||
|
||||
@ -272,7 +275,7 @@ struct shared_test_data {
|
||||
};
|
||||
|
||||
using test::after;
|
||||
using namespace std::chrono;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
#ifdef BOOST_ASIO_HAS_CO_AWAIT
|
||||
|
||||
|
@ -10,6 +10,8 @@
|
||||
#include <boost/asio/use_awaitable.hpp>
|
||||
#ifdef BOOST_ASIO_HAS_CO_AWAIT
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#include <boost/asio/as_tuple.hpp>
|
||||
#include <boost/asio/co_spawn.hpp>
|
||||
#include <boost/asio/detached.hpp>
|
||||
@ -19,6 +21,8 @@
|
||||
|
||||
#include <boost/beast/websocket.hpp>
|
||||
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#include <async_mqtt5.hpp>
|
||||
|
||||
namespace boost::beast::websocket {
|
||||
|
@ -8,15 +8,21 @@
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/asio/ssl/stream.hpp>
|
||||
|
||||
#include <boost/type_traits/remove_cv_ref.hpp>
|
||||
|
||||
#include <async_mqtt5/mqtt_client.hpp>
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include "test_common/message_exchange.hpp"
|
||||
#include "test_common/packet_util.hpp"
|
||||
@ -78,7 +84,7 @@ BOOST_AUTO_TEST_CASE(create_client_with_execution_context) {
|
||||
BOOST_CHECK(c.get_executor() == ioc.get_executor());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(assign_tls_context) {
|
||||
void assign_tls_context() {
|
||||
// Tests if the tls_context function compiles
|
||||
|
||||
asio::io_context ioc;
|
||||
@ -113,7 +119,7 @@ BOOST_FIXTURE_TEST_CASE(assign_credentials, shared_test_data) {
|
||||
);
|
||||
}
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE(assign_credentials_tls_client, shared_test_data) {
|
||||
void assign_credentials_tls_client() {
|
||||
// Tests if the assign credentials function compiles
|
||||
|
||||
std::string client_id = "client_id";
|
||||
@ -155,7 +161,7 @@ BOOST_FIXTURE_TEST_CASE(assign_will, shared_test_data) {
|
||||
);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(assign_authenticator) {
|
||||
void assign_authenticator() {
|
||||
// Tests if the authenticator function compiles
|
||||
|
||||
asio::io_context ioc;
|
||||
@ -163,7 +169,7 @@ BOOST_AUTO_TEST_CASE(assign_authenticator) {
|
||||
c.authenticator(test::test_authenticator());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(assign_authenticator_tls_client) {
|
||||
void assign_authenticator_tls_client() {
|
||||
// Tests if the authenticator function compiles
|
||||
|
||||
asio::io_context ioc;
|
||||
@ -435,7 +441,7 @@ BOOST_FIXTURE_TEST_CASE(connack_property, shared_connack_prop_test_data) {
|
||||
);
|
||||
}
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE(connack_property_with_tls_client, shared_connack_prop_test_data) {
|
||||
void connack_property_with_tls_client() {
|
||||
// Tests if the connack_properties & connack_property functions compile
|
||||
|
||||
asio::io_context ioc;
|
||||
|
@ -7,11 +7,15 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
|
||||
#include <async_mqtt5/mqtt_client.hpp>
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include "test_common/message_exchange.hpp"
|
||||
#include "test_common/test_broker.hpp"
|
||||
|
@ -7,11 +7,15 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/bind_executor.hpp>
|
||||
#include <boost/asio/bind_immediate_executor.hpp>
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/strand.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
|
||||
@ -30,7 +34,7 @@ BOOST_AUTO_TEST_SUITE(executors)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(bind_executor) {
|
||||
using test::after;
|
||||
using namespace std::chrono;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
constexpr int expected_handlers_called = 8;
|
||||
int handlers_called = 0;
|
||||
|
@ -10,12 +10,15 @@
|
||||
#include <boost/asio/use_awaitable.hpp>
|
||||
#ifdef BOOST_ASIO_HAS_CO_AWAIT
|
||||
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
|
||||
#include <boost/asio/as_tuple.hpp>
|
||||
#include <boost/asio/co_spawn.hpp>
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
#include <boost/asio/experimental/awaitable_operators.hpp>
|
||||
|
@ -5,13 +5,19 @@
|
||||
// (See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
|
||||
#include <async_mqtt5/mqtt_client.hpp>
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include "test_common/message_exchange.hpp"
|
||||
#include "test_common/test_service.hpp"
|
||||
@ -34,7 +40,7 @@ struct shared_test_data {
|
||||
};
|
||||
|
||||
using test::after;
|
||||
using namespace std::chrono;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
std::string connect_with_keep_alive(uint16_t keep_alive) {
|
||||
return encoders::encode_connect(
|
||||
|
@ -7,10 +7,18 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
|
||||
#include <async_mqtt5/mqtt_client.hpp>
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include "test_common/message_exchange.hpp"
|
||||
#include "test_common/packet_util.hpp"
|
||||
@ -59,7 +67,7 @@ struct shared_test_data {
|
||||
};
|
||||
|
||||
using test::after;
|
||||
using namespace std::chrono;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
template <typename Authenticator = std::monostate>
|
||||
void run_test(
|
||||
|
@ -7,9 +7,17 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
|
||||
#include <boost/asio/any_completion_handler.hpp>
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
|
||||
#include <async_mqtt5/mqtt_client.hpp>
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include "test_common/message_exchange.hpp"
|
||||
#include "test_common/test_service.hpp"
|
||||
@ -20,7 +28,7 @@ using namespace async_mqtt5;
|
||||
BOOST_AUTO_TEST_SUITE(read_message/*, *boost::unit_test::disabled()*/)
|
||||
|
||||
using test::after;
|
||||
using namespace std::chrono;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
void test_receive_malformed_packet(
|
||||
std::string malformed_packet, std::string reason_string
|
||||
|
@ -7,11 +7,18 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
|
||||
#include <boost/algorithm/string/join.hpp>
|
||||
|
||||
#include <async_mqtt5/mqtt_client.hpp>
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include "test_common/message_exchange.hpp"
|
||||
#include "test_common/packet_util.hpp"
|
||||
@ -55,7 +62,7 @@ struct shared_test_data {
|
||||
};
|
||||
|
||||
using test::after;
|
||||
using namespace std::chrono;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
void run_test(
|
||||
test::msg_exchange broker_side, connect_props cprops = {}
|
||||
|
@ -7,9 +7,18 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include <boost/asio/any_completion_handler.hpp>
|
||||
#include <boost/asio/bind_cancellation_slot.hpp>
|
||||
#include <boost/asio/cancellation_signal.hpp>
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
|
||||
#include <async_mqtt5/mqtt_client.hpp>
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include "test_common/message_exchange.hpp"
|
||||
#include "test_common/packet_util.hpp"
|
||||
@ -52,7 +61,7 @@ struct shared_test_data {
|
||||
};
|
||||
|
||||
using test::after;
|
||||
using namespace std::chrono;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
template <qos_e qos>
|
||||
void run_test(
|
||||
|
@ -7,12 +7,19 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/asio/any_completion_handler.hpp>
|
||||
#include <boost/asio/bind_cancellation_slot.hpp>
|
||||
#include <boost/asio/cancellation_signal.hpp>
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
|
||||
#include <async_mqtt5/mqtt_client.hpp>
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include "test_common/message_exchange.hpp"
|
||||
#include "test_common/packet_util.hpp"
|
||||
@ -61,7 +68,7 @@ struct shared_test_data {
|
||||
};
|
||||
|
||||
using test::after;
|
||||
using namespace std::chrono;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
template <test::operation_type op_type>
|
||||
void run_test(test::msg_exchange broker_side) {
|
||||
|
@ -7,11 +7,17 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
|
||||
#include <boost/asio/bind_executor.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/strand.hpp>
|
||||
#include <boost/asio/thread_pool.hpp>
|
||||
|
||||
#include <async_mqtt5/types.hpp>
|
||||
#include <async_mqtt5/detail/async_mutex.hpp>
|
||||
|
||||
using namespace async_mqtt5;
|
||||
|
@ -7,16 +7,18 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/connect_op.hpp>
|
||||
|
||||
#include <async_mqtt5/types.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
#include <async_mqtt5/impl/connect_op.hpp>
|
||||
|
||||
#include "test_common/test_authenticators.hpp"
|
||||
#include "test_common/test_stream.hpp"
|
||||
@ -38,7 +40,7 @@ struct shared_test_data {
|
||||
};
|
||||
|
||||
using test::after;
|
||||
using namespace std::chrono;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
void run_unit_test(
|
||||
detail::mqtt_ctx mqtt_ctx, test::msg_exchange broker_side,
|
||||
|
@ -10,14 +10,15 @@
|
||||
|
||||
#ifdef BOOST_ASIO_HAS_CO_AWAIT
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <variant> // std::monostate
|
||||
#include <vector>
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
|
||||
#include <boost/asio/ssl.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
#include <boost/beast/websocket/stream.hpp>
|
||||
#include <boost/beast/websocket/ssl.hpp> // async_teardown for asio::ssl::socket
|
||||
|
||||
|
@ -7,8 +7,15 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
#include <async_mqtt5/types.hpp>
|
||||
#include <async_mqtt5/impl/disconnect_op.hpp>
|
||||
|
||||
#include "test_common/test_service.hpp"
|
||||
|
@ -7,7 +7,8 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <sstream>
|
||||
#include <iosfwd>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <async_mqtt5/error.hpp>
|
||||
|
@ -7,10 +7,19 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/asio/bind_cancellation_slot.hpp>
|
||||
#include <boost/asio/cancellation_signal.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/client_service.hpp>
|
||||
#include <async_mqtt5/impl/publish_send_op.hpp>
|
||||
|
@ -7,7 +7,8 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <chrono>
|
||||
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/reconnect_op.hpp>
|
||||
|
@ -7,6 +7,12 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include <async_mqtt5/reason_codes.hpp>
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
|
@ -7,6 +7,14 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
#include <async_mqtt5.hpp>
|
||||
#include <test_common/test_service.hpp>
|
||||
|
||||
|
@ -7,8 +7,16 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
#include <async_mqtt5/types.hpp>
|
||||
#include <async_mqtt5/impl/subscribe_op.hpp>
|
||||
|
||||
#include "test_common/test_service.hpp"
|
||||
|
@ -7,8 +7,16 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
#include <async_mqtt5/types.hpp>
|
||||
#include <async_mqtt5/impl/unsubscribe_op.hpp>
|
||||
|
||||
#include "test_common/test_service.hpp"
|
||||
|
Reference in New Issue
Block a user