12#include <boost/asio/io_context.hpp>
15#include <unordered_map>
34 explicit Client(boost::asio::ip::address fallback_address)
37 explicit Client(
const std::string &fallback_address)
51 template <
typename Functor>
53 boost::asio::io_context &io_context,
60 auto client = std::make_shared<underlying_client>(
63 std::forward<Functor>(callback));
69 log_debug(
"calling sensor UnSubscribe()");
#define DEBUG_ASSERT_EQ(lhs, rhs)
Serializes a stream endpoint.
const auto & get_stream_id() const
void set_address(const boost::asio::ip::address &addr)
A client able to subscribe to multiple streams.
std::unordered_map< detail::stream_id_type, std::shared_ptr< underlying_client > > _clients
void Subscribe(boost::asio::io_context &io_context, token_type token, Functor &&callback)
typename underlying_client::protocol_type protocol_type
boost::asio::ip::address _fallback_address
Client(boost::asio::ip::address fallback_address)
Client(const std::string &fallback_address)
void UnSubscribe(token_type token)
static auto make_address(const std::string &address)
static auto make_localhost_address()
This file contains definitions of common data structures used in traffic manager.
static void log_debug(Args &&... args)