Add Windows builds to CI

Summary: related to T15996

Reviewers: ivica

Reviewed By: ivica

Subscribers: iljazovic, miljen

Differential Revision: https://repo.mireo.local/D33712
This commit is contained in:
Korina Šimičević
2025-02-13 13:20:55 +01:00
parent 7d18f20e56
commit 4b3b710300
4 changed files with 202 additions and 21 deletions

View File

@ -40,15 +40,19 @@ public:
using executor_type = typename stream_type::executor_type;
using logger_type = LoggerType;
private:
using async_mutex = boost::mqtt5::detail::async_mutex;
using endpoints = boost::mqtt5::detail::endpoints<logger_type>;
using log_invoke = boost::mqtt5::detail::log_invoke<logger_type>;
executor_type _stream_executor;
detail::async_mutex _conn_mtx;
async_mutex _conn_mtx;
asio::steady_timer _connect_timer;
detail::endpoints<logger_type> _endpoints;
endpoints _endpoints;
stream_ptr _stream_ptr;
stream_context_type& _stream_context;
detail::log_invoke<logger_type> _log;
log_invoke _log;
template <typename Stream>
friend class boost::mqtt5::detail::reconnect_op;
@ -57,7 +61,7 @@ public:
test_autoconnect_stream(
const executor_type& ex,
stream_context_type& context,
detail::log_invoke<logger_type>& log
log_invoke& log
) :
_stream_executor(ex),
_conn_mtx(_stream_executor),
@ -78,7 +82,7 @@ public:
}
bool is_open() const noexcept {
return detail::lowest_layer(*_stream_ptr).is_open();
return boost::mqtt5::detail::lowest_layer(*_stream_ptr).is_open();
}
void brokers(std::string hosts, uint16_t default_port) {
@ -87,7 +91,7 @@ public:
static void open_lowest_layer(const stream_ptr& sptr, asio::ip::tcp protocol) {
error_code ec;
auto& layer = detail::lowest_layer(*sptr);
auto& layer = boost::mqtt5::detail::lowest_layer(*sptr);
layer.open(protocol, ec);
layer.set_option(asio::socket_base::reuse_address(true), ec);
layer.set_option(asio::ip::tcp::no_delay(true), ec);
@ -95,12 +99,12 @@ public:
void close() {
error_code ec;
detail::lowest_layer(*_stream_ptr).close(ec);
boost::mqtt5::detail::lowest_layer(*_stream_ptr).close(ec);
}
stream_ptr construct_next_layer() const {
stream_ptr sptr;
if constexpr (detail::has_tls_context<StreamContext>)
if constexpr (boost::mqtt5::detail::has_tls_context<StreamContext>)
sptr = std::make_shared<stream_type>(
_stream_executor, _stream_context.tls_context()
);
@ -123,7 +127,7 @@ public:
}
private:
detail::log_invoke<logger_type>& log() {
log_invoke& log() {
return _log;
}
};