15 #include <boost/asio/io_context.hpp> 29 explicit Client(
const std::string &fallback_address)
38 template <
typename Functor>
void UnSubscribe(const Token &token)
Client(const std::string &fallback_address)
This file contains definitions of common data structures used in traffic manager. ...
void UnSubscribe(token_type token)
void AsyncRun(size_t worker_threads)
Serializes a stream endpoint.
void Run()
Run tasks in this thread.
A token that uniquely identify a stream.
void Subscribe(const Token &token, Functor &&callback)
A thread pool based on Boost.Asio's io context.
A client able to subscribe to multiple streams.
void Stop()
Stop the ThreadPool and join all its threads.
void AsyncRun(size_t worker_threads)
Launch threads to run tasks asynchronously.
underlying_client _client
void Subscribe(boost::asio::io_context &io_context, token_type token, Functor &&callback)
auto & io_context()
Return the underlying io_context.
carla::streaming::detail::token_type token_type