Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

= History

== 10.2.7
* Removed unintentional copy requiment from some of async functions parameter. #437
* Rifined documents. #435
* Added TLS Websocket verify none port to broker for browser. #434
* Added Cerfiticate file's digitalSignature to keyUsage. #432

== 10.2.6
* Fixed wss connection from Web Browser handshake failed problem. #431
* Changed trial broker on `mqtt.redboltz.net` ws and wss port. #430
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- I/O independent (also known as Sans-I/O) MQTT protocol library for C++17.
- Asynchronous MQTT communication library using the MQTT protocol library and Boost.Asio.

Version 10.2.6 [![Actions Status](https://github.com/redboltz/async_mqtt/workflows/CI/badge.svg)](https://github.com/redboltz/async_mqtt/actions)[![codecov](https://codecov.io/gh/redboltz/async_mqtt/branch/main/graph/badge.svg)](https://codecov.io/gh/redboltz/async_mqtt)
Version 10.2.7 [![Actions Status](https://github.com/redboltz/async_mqtt/workflows/CI/badge.svg)](https://github.com/redboltz/async_mqtt/actions)[![codecov](https://codecov.io/gh/redboltz/async_mqtt/branch/main/graph/badge.svg)](https://codecov.io/gh/redboltz/async_mqtt)

## Document

Expand Down
60 changes: 31 additions & 29 deletions include/async_mqtt/asio_bind/impl/client_auth.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,37 +88,39 @@ client<Version, NextLayer>::async_auth(Args&&... args) {
}
}
else {
auto all = hana::tuple<Args...>(std::forward<Args>(args)...);
auto back = hana::back(all);
auto rest = hana::drop_back(all, hana::size_c<1>);
return hana::unpack(
std::move(rest),
[&](auto&&... rest_args) {
static_assert(
std::is_constructible_v<
auth_packet,
decltype(rest_args)...
>,
"v5::auth_packet is not constructible"
);
try {
return impl_type::async_auth(
impl_,
error_code{},
auth_packet{std::forward<decltype(rest_args)>(rest_args)...},
force_move(back)
);
}
catch (system_error const& se) {
return impl_type::async_auth(
impl_,
se.code(),
std::nullopt,
force_move(back)
return [this](auto&&... all_args) {
auto all = hana::make_tuple(std::forward<decltype(all_args)>(all_args)...);
constexpr auto N = sizeof...(all_args);
auto back = hana::at_c<N - 1>(force_move(all));
return hana::unpack(
hana::drop_back(force_move(all), hana::size_c<1>),
[this, back = force_move(back)](auto&&... rest_args) mutable {
static_assert(
std::is_constructible_v<
auth_packet,
decltype(rest_args)...
>,
"v5::auth_packet is not constructible"
);
try {
return impl_type::async_auth(
impl_,
error_code{},
auth_packet{std::forward<decltype(rest_args)>(rest_args)...},
force_move(back)
);
}
catch (system_error const& se) {
return impl_type::async_auth(
impl_,
se.code(),
std::nullopt,
force_move(back)
);
}
}
}
);
);
}(std::forward<Args>(args)...);
}
}

Expand Down
60 changes: 31 additions & 29 deletions include/async_mqtt/asio_bind/impl/client_disconnect.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,37 +87,39 @@ client<Version, NextLayer>::async_disconnect(Args&&... args) {
}
}
else {
auto all = hana::tuple<Args...>(std::forward<Args>(args)...);
auto back = hana::back(all);
auto rest = hana::drop_back(all, hana::size_c<1>);
return hana::unpack(
std::move(rest),
[&](auto&&... rest_args) {
static_assert(
std::is_constructible_v<
disconnect_packet,
decltype(rest_args)...
>,
"disconnect_packet is not constructible"
);
try {
return impl_type::async_disconnect(
impl_,
error_code{},
disconnect_packet{std::forward<decltype(rest_args)>(rest_args)...},
force_move(back)
);
}
catch (system_error const& se) {
return impl_type::async_disconnect(
impl_,
se.code(),
std::nullopt,
force_move(back)
return [this](auto&&... all_args) {
auto all = hana::make_tuple(std::forward<decltype(all_args)>(all_args)...);
constexpr auto N = sizeof...(all_args);
auto back = hana::at_c<N - 1>(force_move(all));
return hana::unpack(
hana::drop_back(force_move(all), hana::size_c<1>),
[this, back = force_move(back)](auto&&... rest_args) mutable {
static_assert(
std::is_constructible_v<
disconnect_packet,
decltype(rest_args)...
>,
"disconnect_packet is not constructible"
);
try {
return impl_type::async_disconnect(
impl_,
error_code{},
disconnect_packet{std::forward<decltype(rest_args)>(rest_args)...},
force_move(back)
);
}
catch (system_error const& se) {
return impl_type::async_disconnect(
impl_,
se.code(),
std::nullopt,
force_move(back)
);
}
}
}
);
);
}(std::forward<Args>(args)...);
}
}

Expand Down
60 changes: 31 additions & 29 deletions include/async_mqtt/asio_bind/impl/client_publish.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,37 +87,39 @@ client<Version, NextLayer>::async_publish(Args&&... args) {
}
}
else {
auto all = hana::tuple<Args...>(std::forward<Args>(args)...);
auto back = hana::back(all);
auto rest = hana::drop_back(all, hana::size_c<1>);
return hana::unpack(
std::move(rest),
[&](auto&&... rest_args) {
static_assert(
std::is_constructible_v<
publish_packet,
decltype(rest_args)...
>,
"publish_packet is not constructible"
);
try {
return impl_type::async_publish(
impl_,
error_code{},
publish_packet{std::forward<decltype(rest_args)>(rest_args)...},
force_move(back)
);
}
catch (system_error const& se) {
return impl_type::async_publish(
impl_,
se.code(),
std::nullopt,
force_move(back)
return [this](auto&&... all_args) {
auto all = hana::make_tuple(std::forward<decltype(all_args)>(all_args)...);
constexpr auto N = sizeof...(all_args);
auto back = hana::at_c<N - 1>(force_move(all));
return hana::unpack(
hana::drop_back(force_move(all), hana::size_c<1>),
[this, back = force_move(back)](auto&&... rest_args) mutable {
static_assert(
std::is_constructible_v<
publish_packet,
decltype(rest_args)...
>,
"publish_packet is not constructible"
);
try {
return impl_type::async_publish(
impl_,
error_code{},
publish_packet{std::forward<decltype(rest_args)>(rest_args)...},
force_move(back)
);
}
catch (system_error const& se) {
return impl_type::async_publish(
impl_,
se.code(),
std::nullopt,
force_move(back)
);
}
}
}
);
);
}(std::forward<Args>(args)...);
}
}

Expand Down
64 changes: 33 additions & 31 deletions include/async_mqtt/asio_bind/impl/client_start.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,39 +89,41 @@ client<Version, NextLayer>::async_start(Args&&... args) {
}
}
else {
auto all = hana::tuple<Args...>(std::forward<Args>(args)...);
auto back = hana::back(all);
auto rest = hana::drop_back(all, hana::size_c<1>);
return hana::unpack(
std::move(rest),
[&](auto&&... rest_args) {
static_assert(
std::is_constructible_v<
connect_packet,
decltype(rest_args)...
>,
"connect_packet is not constructible"
);
try {
return impl_type::async_start(
impl_,
error_code{},
connect_packet{
std::forward<std::remove_reference_t<decltype(rest_args)>>(rest_args)...
},
force_move(back)
);
}
catch (system_error const& se) {
return impl_type::async_start(
impl_,
se.code(),
std::nullopt,
force_move(back)
return [this](auto&&... all_args) {
auto all = hana::make_tuple(std::forward<decltype(all_args)>(all_args)...);
constexpr auto N = sizeof...(all_args);
auto back = hana::at_c<N - 1>(force_move(all));
return hana::unpack(
hana::drop_back(force_move(all), hana::size_c<1>),
[this, back = force_move(back)](auto&&... rest_args) mutable {
static_assert(
std::is_constructible_v<
connect_packet,
decltype(rest_args)...
>,
"connect_packet is not constructible"
);
try {
return impl_type::async_start(
impl_,
error_code{},
connect_packet{
std::forward<std::remove_reference_t<decltype(rest_args)>>(rest_args)...
},
force_move(back)
);
}
catch (system_error const& se) {
return impl_type::async_start(
impl_,
se.code(),
std::nullopt,
force_move(back)
);
}
}
}
);
);
}(std::forward<Args>(args)...);
}
}

Expand Down
60 changes: 31 additions & 29 deletions include/async_mqtt/asio_bind/impl/client_subscribe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,37 +87,39 @@ client<Version, NextLayer>::async_subscribe(Args&&... args) {
}
}
else {
auto all = hana::tuple<Args...>(std::forward<Args>(args)...);
auto back = hana::back(all);
auto rest = hana::drop_back(all, hana::size_c<1>);
return hana::unpack(
std::move(rest),
[&](auto&&... rest_args) {
static_assert(
std::is_constructible_v<
subscribe_packet,
decltype(rest_args)...
>,
"subscribe_packet is not constructible"
);
try {
return impl_type::async_subscribe(
impl_,
error_code{},
subscribe_packet{std::forward<decltype(rest_args)>(rest_args)...},
force_move(back)
);
}
catch (system_error const& se) {
return impl_type::async_subscribe(
impl_,
se.code(),
std::nullopt,
force_move(back)
return [this](auto&&... all_args) {
auto all = hana::make_tuple(std::forward<decltype(all_args)>(all_args)...);
constexpr auto N = sizeof...(all_args);
auto back = hana::at_c<N - 1>(force_move(all));
return hana::unpack(
hana::drop_back(force_move(all), hana::size_c<1>),
[this, back = force_move(back)](auto&&... rest_args) mutable {
static_assert(
std::is_constructible_v<
subscribe_packet,
decltype(rest_args)...
>,
"subscribe_packet is not constructible"
);
try {
return impl_type::async_subscribe(
impl_,
error_code{},
subscribe_packet{std::forward<decltype(rest_args)>(rest_args)...},
force_move(back)
);
}
catch (system_error const& se) {
return impl_type::async_subscribe(
impl_,
se.code(),
std::nullopt,
force_move(back)
);
}
}
}
);
);
}(std::forward<Args>(args)...);
}
}

Expand Down
Loading