mirror of
https://github.com/boostorg/mqtt5.git
synced 2025-10-04 04:40:55 +02:00
[mqtt client&test] #includes housekeeping
Summary: resolves T12777 Reviewers: ivica Reviewed By: ivica Subscribers: miljen Maniphest Tasks: T12777 Differential Revision: https://repo.mireo.local/D25995
This commit is contained in:
@@ -1,16 +1,20 @@
|
||||
#ifndef ASYNC_MQTT5_ASSEMBLE_OP_HPP
|
||||
#define ASYNC_MQTT5_ASSEMBLE_OP_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/asio/append.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/asio/append.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/completion_condition.hpp>
|
||||
|
||||
#include <async_mqtt5/error.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/internal/codecs/base_decoders.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_decoders.hpp>
|
||||
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include <boost/asio/any_completion_handler.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
@@ -3,24 +3,20 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <boost/asio/connect.hpp>
|
||||
#include <boost/asio/read.hpp>
|
||||
#include <boost/asio/write.hpp>
|
||||
#include <boost/asio/completion_condition.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
#include <async_mqtt5/detail/async_mutex.hpp>
|
||||
#include <async_mqtt5/detail/async_traits.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/endpoints.hpp>
|
||||
#include <async_mqtt5/impl/reconnect_op.hpp>
|
||||
#include <async_mqtt5/impl/read_op.hpp>
|
||||
#include <async_mqtt5/impl/reconnect_op.hpp>
|
||||
#include <async_mqtt5/impl/write_op.hpp>
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
|
||||
namespace asio = boost::asio;
|
||||
using error_code = boost::system::error_code;
|
||||
|
||||
template <
|
||||
typename StreamType,
|
||||
|
@@ -3,18 +3,18 @@
|
||||
|
||||
#include <boost/asio/experimental/concurrent_channel.hpp>
|
||||
|
||||
#include <async_mqtt5/error.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/autoconnect_stream.hpp>
|
||||
#include <async_mqtt5/impl/replies.hpp>
|
||||
#include <async_mqtt5/impl/async_sender.hpp>
|
||||
#include <async_mqtt5/impl/assemble_op.hpp>
|
||||
#include <async_mqtt5/impl/async_sender.hpp>
|
||||
#include <async_mqtt5/impl/autoconnect_stream.hpp>
|
||||
#include <async_mqtt5/impl/ping_op.hpp>
|
||||
#include <async_mqtt5/impl/replies.hpp>
|
||||
#include <async_mqtt5/impl/sentry_op.hpp>
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
|
||||
namespace asio = boost::asio;
|
||||
|
||||
template <typename StreamType, typename TlsContext>
|
||||
class stream_context;
|
||||
@@ -95,8 +95,8 @@ template <
|
||||
typename TlsContext = std::monostate
|
||||
>
|
||||
class client_service {
|
||||
using stream_context_type = detail::stream_context<StreamType, TlsContext>;
|
||||
using stream_type = detail::autoconnect_stream<
|
||||
using stream_context_type = stream_context<StreamType, TlsContext>;
|
||||
using stream_type = autoconnect_stream<
|
||||
StreamType, stream_context_type
|
||||
>;
|
||||
public:
|
||||
@@ -108,26 +108,26 @@ private:
|
||||
>;
|
||||
|
||||
template <typename ClientService>
|
||||
friend class detail::async_sender;
|
||||
friend class async_sender;
|
||||
|
||||
template <typename ClientService, typename Handler>
|
||||
friend class detail::assemble_op;
|
||||
friend class assemble_op;
|
||||
|
||||
template <typename ClientService>
|
||||
friend class detail::ping_op;
|
||||
friend class ping_op;
|
||||
|
||||
template <typename ClientService>
|
||||
friend class detail::sentry_op;
|
||||
friend class sentry_op;
|
||||
|
||||
stream_context_type _stream_context;
|
||||
stream_type _stream;
|
||||
|
||||
packet_id_allocator _pid_allocator;
|
||||
detail::replies _replies;
|
||||
detail::async_sender<client_service> _async_sender;
|
||||
replies _replies;
|
||||
async_sender<client_service> _async_sender;
|
||||
|
||||
std::string _read_buff;
|
||||
detail::data_span _active_span;
|
||||
data_span _active_span;
|
||||
|
||||
receive_channel _rec_channel;
|
||||
|
||||
@@ -231,7 +231,7 @@ public:
|
||||
template <typename CompletionToken>
|
||||
decltype(auto) async_assemble(duration wait_for, CompletionToken&& token) {
|
||||
auto initiation = [this] (auto handler, duration wait_for) mutable {
|
||||
detail::assemble_op {
|
||||
assemble_op {
|
||||
*this, std::move(handler),
|
||||
_read_buff, _active_span
|
||||
}.perform(wait_for, asio::transfer_at_least(0));
|
||||
|
@@ -1,26 +1,26 @@
|
||||
#ifndef ASYNC_MQTT5_CONNECT_OP_HPP
|
||||
#define ASYNC_MQTT5_CONNECT_OP_HPP
|
||||
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/asio/consign.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/append.hpp>
|
||||
#include <boost/asio/consign.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/read.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/write.hpp>
|
||||
|
||||
#include <boost/beast/websocket.hpp>
|
||||
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
#include <async_mqtt5/error.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
#include <async_mqtt5/detail/async_traits.hpp>
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/internal/codecs/base_decoders.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_encoders.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_decoders.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_encoders.hpp>
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
}
|
||||
|
||||
void perform(
|
||||
const connect_op::epoints& eps, authority_path ap
|
||||
const epoints& eps, authority_path ap
|
||||
) {
|
||||
lowest_layer(_stream).async_connect(
|
||||
*std::begin(eps),
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
}
|
||||
|
||||
void operator()(
|
||||
on_connect, error_code ec, connect_op::endpoint ep, authority_path ap
|
||||
on_connect, error_code ec, endpoint ep, authority_path ap
|
||||
) {
|
||||
if (ec)
|
||||
return complete(ec);
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
do_tls_handshake(std::move(ep), std::move(ap));
|
||||
}
|
||||
|
||||
void do_tls_handshake(connect_op::endpoint ep, authority_path ap) {
|
||||
void do_tls_handshake(endpoint ep, authority_path ap) {
|
||||
if constexpr (has_tls_handshake<Stream>) {
|
||||
_stream.async_handshake(
|
||||
tls_handshake_type<Stream>::client,
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
|
||||
void operator()(
|
||||
on_tls_handshake, error_code ec,
|
||||
connect_op::endpoint ep, authority_path ap
|
||||
endpoint ep, authority_path ap
|
||||
) {
|
||||
if (ec)
|
||||
return complete(ec);
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
do_ws_handshake(std::move(ep), std::move(ap));
|
||||
}
|
||||
|
||||
void do_ws_handshake(connect_op::endpoint ep, authority_path ap) {
|
||||
void do_ws_handshake(endpoint ep, authority_path ap) {
|
||||
if constexpr (has_ws_handshake<Stream>) {
|
||||
using namespace boost::beast;
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
|
||||
const auto& wire_data = packet.wire_data();
|
||||
|
||||
async_mqtt5::detail::async_write(
|
||||
detail::async_write(
|
||||
_stream, asio::buffer(wire_data),
|
||||
asio::consign(
|
||||
asio::prepend(std::move(*this), on_send_connect{}),
|
||||
|
@@ -1,14 +1,15 @@
|
||||
#ifndef ASYNC_MQTT5_DISCONNECT_OP_HPP
|
||||
#define ASYNC_MQTT5_DISCONNECT_OP_HPP
|
||||
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/consign.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
|
||||
#include <async_mqtt5/types.hpp>
|
||||
#include <async_mqtt5/detail/async_traits.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/internal/codecs/message_encoders.hpp>
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
@@ -119,18 +120,18 @@ decltype(auto) async_disconnect(
|
||||
using Signature = void (error_code);
|
||||
|
||||
auto initiate = [](
|
||||
auto handler, detail::disconnect_context ctx, bool terminal,
|
||||
auto handler, disconnect_context ctx,
|
||||
const std::shared_ptr<ClientService>& svc_ptr
|
||||
) {
|
||||
detail::disconnect_op {
|
||||
disconnect_op {
|
||||
svc_ptr, std::move(ctx), std::move(handler)
|
||||
}.perform();
|
||||
};
|
||||
|
||||
return asio::async_initiate<CompletionToken, Signature>(
|
||||
std::move(initiate), token,
|
||||
detail::disconnect_context { reason_code, props, terminal },
|
||||
terminal, svc_ptr
|
||||
disconnect_context { reason_code, props, terminal },
|
||||
svc_ptr
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -1,16 +1,19 @@
|
||||
#ifndef ASYNC_MQTT5_ENDPOINTS_HPP
|
||||
#define ASYNC_MQTT5_ENDPOINTS_HPP
|
||||
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/append.hpp>
|
||||
#include <boost/asio/deferred.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
|
||||
#include <boost/asio/experimental/parallel_group.hpp>
|
||||
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
#include <boost/spirit/home/x3.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
#include <async_mqtt5/detail/async_traits.hpp>
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
|
||||
|
@@ -1,9 +1,6 @@
|
||||
#ifndef ASYNC_MQTT5_MEMORY_H
|
||||
#define ASYNC_MQTT5_MEMORY_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "memory_resource.h"
|
||||
|
||||
namespace pma {
|
||||
|
@@ -3,11 +3,12 @@
|
||||
|
||||
#include <boost/spirit/home/x3.hpp>
|
||||
#include <boost/spirit/home/x3/binary/binary.hpp>
|
||||
|
||||
#include <boost/fusion/adapted/std_tuple.hpp>
|
||||
|
||||
#include <async_mqtt5/property_types.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/traits.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/internal/codecs/traits.hpp>
|
||||
|
||||
namespace async_mqtt5::decoders {
|
||||
|
||||
|
@@ -3,9 +3,11 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
#include <boost/endian/conversion.hpp>
|
||||
|
||||
#include <async_mqtt5/property_types.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/internal/codecs/traits.hpp>
|
||||
|
||||
namespace async_mqtt5::encoders {
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#include <string>
|
||||
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/internal/codecs/base_decoders.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_decoders.hpp>
|
||||
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#include <optional>
|
||||
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/internal/codecs/base_encoders.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_encoders.hpp>
|
||||
|
||||
|
@@ -4,14 +4,14 @@
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/consign.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/recycling_allocator.hpp>
|
||||
#include <boost/asio/cancellation_state.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/internal/codecs/message_encoders.hpp>
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
|
@@ -2,19 +2,21 @@
|
||||
#define ASYNC_MQTT5_PUBLISH_REC_OP_HPP
|
||||
|
||||
#include <memory>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
|
||||
#include <boost/asio/consign.hpp>
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/recycling_allocator.hpp>
|
||||
|
||||
#include <async_mqtt5/error.hpp>
|
||||
|
||||
#include <async_mqtt5/property_types.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/disconnect_op.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_encoders.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_decoders.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_encoders.hpp>
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
|
||||
@@ -69,7 +71,7 @@ public:
|
||||
auto puback = control_packet<allocator_type>::of(
|
||||
with_pid, get_allocator(),
|
||||
encoders::encode_puback, *packet_id,
|
||||
uint8_t(0), puback_props{}
|
||||
uint8_t(0), puback_props {}
|
||||
);
|
||||
return send_puback(std::move(puback));
|
||||
}
|
||||
@@ -78,7 +80,7 @@ public:
|
||||
auto pubrec = control_packet<allocator_type>::of(
|
||||
with_pid, get_allocator(),
|
||||
encoders::encode_pubrec, *packet_id,
|
||||
uint8_t(0), pubrec_props{}
|
||||
uint8_t(0), pubrec_props {}
|
||||
);
|
||||
|
||||
return send_pubrec(std::move(pubrec));
|
||||
|
@@ -2,18 +2,18 @@
|
||||
#define ASYNC_MQTT5_PUBLISH_SEND_OP_HPP
|
||||
|
||||
#include <boost/asio/detached.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
|
||||
#include <async_mqtt5/error.hpp>
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
#include <async_mqtt5/detail/async_traits.hpp>
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
#include <async_mqtt5/detail/cancellable_handler.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/internal/codecs/message_decoders.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_encoders.hpp>
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/disconnect_op.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_decoders.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_encoders.hpp>
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
|
||||
|
@@ -7,10 +7,13 @@
|
||||
#include <boost/asio/recycling_allocator.hpp>
|
||||
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_decoders.hpp>
|
||||
#include <async_mqtt5/impl/publish_rec_op.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/disconnect_op.hpp>
|
||||
#include <async_mqtt5/impl/publish_rec_op.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/internal/codecs/message_decoders.hpp>
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
|
||||
@@ -76,6 +79,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
// TODO: ec & packet_id are not used here
|
||||
void dispatch(
|
||||
error_code ec, uint16_t packet_id, uint8_t control_byte,
|
||||
byte_citer first, byte_citer last
|
||||
@@ -106,6 +110,7 @@ private:
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
perform();
|
||||
}
|
||||
|
||||
|
@@ -1,8 +1,9 @@
|
||||
#ifndef ASYNC_MQTT5_READ_OP_HPP
|
||||
#define ASYNC_MQTT5_READ_OP_HPP
|
||||
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/deferred.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
|
||||
#include <boost/asio/experimental/parallel_group.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
@@ -57,7 +58,6 @@ public:
|
||||
asioex::wait_for_one(),
|
||||
asio::prepend(std::move(*this), on_read {}, stream_ptr)
|
||||
);
|
||||
|
||||
}
|
||||
else
|
||||
(*this)(
|
||||
|
@@ -1,14 +1,18 @@
|
||||
#ifndef ASYNC_MQTT5_RECONNECT_OP_HPP
|
||||
#define ASYNC_MQTT5_RECONNECT_OP_HPP
|
||||
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/deferred.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
|
||||
#include <boost/asio/experimental/parallel_group.hpp>
|
||||
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/async_traits.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/connect_op.hpp>
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
|
@@ -1,16 +1,13 @@
|
||||
#ifndef ASYNC_MQTT5_REPLIES_HPP
|
||||
#define ASYNC_MQTT5_REPLIES_HPP
|
||||
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/any_completion_handler.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/consign.hpp>
|
||||
|
||||
#include <async_mqtt5/error.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
|
||||
|
@@ -1,14 +1,17 @@
|
||||
#ifndef ASYNC_MQTT5_SENTRY_OP_HPP
|
||||
#define ASYNC_MQTT5_SENTRY_OP_HPP
|
||||
|
||||
#include <boost/asio/cancellation_signal.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/recycling_allocator.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/cancellation_state.hpp>
|
||||
#include <boost/asio/recycling_allocator.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
|
||||
#include <async_mqtt5/error.hpp>
|
||||
#include <async_mqtt5/types.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/disconnect_op.hpp>
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
|
||||
namespace asio = boost::asio;
|
||||
|
@@ -5,13 +5,12 @@
|
||||
|
||||
#include <async_mqtt5/error.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
#include <async_mqtt5/detail/async_traits.hpp>
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
#include <async_mqtt5/detail/cancellable_handler.hpp>
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/internal/codecs/message_encoders.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_decoders.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_encoders.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/disconnect_op.hpp>
|
||||
|
||||
|
@@ -1,18 +1,18 @@
|
||||
#ifndef ASYNC_MQTT5_UNSUBSCRIBE_OP_HPP
|
||||
#define ASYNC_MQTT5_UNSUBSCRIBE_OP_HPP
|
||||
|
||||
#include <boost/asio/associated_allocator.hpp>
|
||||
#include <boost/asio/detached.hpp>
|
||||
|
||||
#include <async_mqtt5/error.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
#include <async_mqtt5/detail/async_traits.hpp>
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
#include <async_mqtt5/detail/cancellable_handler.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/internal/codecs/message_encoders.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_decoders.hpp>
|
||||
#include <async_mqtt5/detail/cancellable_handler.hpp>
|
||||
#include <async_mqtt5/detail/control_packet.hpp>
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
|
||||
#include <async_mqtt5/impl/disconnect_op.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_decoders.hpp>
|
||||
#include <async_mqtt5/impl/internal/codecs/message_encoders.hpp>
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
|
||||
@@ -144,7 +144,7 @@ private:
|
||||
void on_malformed_packet(
|
||||
const std::string& reason
|
||||
) {
|
||||
auto props = disconnect_props{};
|
||||
auto props = disconnect_props {};
|
||||
props[prop::reason_string] = reason;
|
||||
async_disconnect(
|
||||
disconnect_rc_e::malformed_packet, props, false, _svc_ptr,
|
||||
|
@@ -1,11 +1,10 @@
|
||||
#ifndef ASYNC_MQTT5_WRITE_OP_HPP
|
||||
#define ASYNC_MQTT5_WRITE_OP_HPP
|
||||
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/write.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
|
||||
#include <async_mqtt5/detail/internal_types.hpp>
|
||||
#include <async_mqtt5/detail/async_traits.hpp>
|
||||
|
||||
namespace async_mqtt5::detail {
|
||||
|
Reference in New Issue
Block a user