22#define RESOLVE_ATTEMPT_UDP_H
33
44#include " cancellation.h"
5+ #include " forward.h"
56#include " stream_info_impl.h"
67#include < boost/asio/ip/udp.hpp>
78#include < boost/asio/steady_timer.hpp>
89#include < map>
910
10- namespace lslboost {
11- namespace system {
12- class error_code ;
13- }
14- } // namespace lslboost
15-
16- using lslboost::asio::ip::udp;
17- using lslboost::system::error_code;
11+ using asio::ip::udp;
12+ using err_t = const lslboost::system::error_code &;
1813
1914namespace lsl {
2015
@@ -53,7 +48,7 @@ class resolve_attempt_udp : public cancellable_obj,
5348 * @param registry A registry where the attempt can register itself as active so it can be
5449 * cancelled during shutdown.
5550 */
56- resolve_attempt_udp (lslboost:: asio::io_context &io, const udp &protocol,
51+ resolve_attempt_udp (asio::io_context &io, const udp &protocol,
5752 const std::vector<udp::endpoint> &targets, const std::string &query,
5853 result_container &results, std::mutex &results_mut, double cancel_after = 5.0 ,
5954 cancellable_registry *registry = nullptr );
@@ -81,7 +76,7 @@ class resolve_attempt_udp : public cancellable_obj,
8176 void send_next_query (endpoint_list::const_iterator next);
8277
8378 // / Handler that gets called when a receive has completed.
84- void handle_receive_outcome (error_code err, std::size_t len);
79+ void handle_receive_outcome (err_t err, std::size_t len);
8580
8681 // === cancellation ===
8782
@@ -91,7 +86,7 @@ class resolve_attempt_udp : public cancellable_obj,
9186
9287 // data shared with the resolver_impl
9388 // / reference to the IO service that executes our actions
94- lslboost:: asio::io_context &io_;
89+ asio::io_context &io_;
9590 // / shared result container
9691 result_container &results_;
9792 // / shared mutex that protects the results
@@ -127,7 +122,7 @@ class resolve_attempt_udp : public cancellable_obj,
127122 // / socket to receive replies (always unicast)
128123 udp::socket recv_socket_;
129124 // / timer to schedule the cancel action
130- lslboost:: asio::steady_timer cancel_timer_;
125+ asio::steady_timer cancel_timer_;
131126};
132127} // namespace lsl
133128
0 commit comments