14#include <boost/asio/io_context.hpp>
33 explicit Server(
const std::string &address, uint16_t port)
37 const std::string &address, uint16_t port,
38 const std::string &external_address, uint16_t external_port)
A thread pool based on Boost.Asio's io context.
void Stop()
Stop the ThreadPool and join all its threads.
void AsyncRun(size_t worker_threads)
Launch threads to run tasks asynchronously.
void Run()
Run tasks in this thread.
std::optional< stream_id > FindStreamAlias(stream_id alias)
carla::streaming::detail::stream_id_type stream_id
token_type GetToken(stream_id sensor_id)
void RemoveStreamAlias(stream_id alias)
void SetTimeout(time_duration timeout)
Server(const std::string &address, uint16_t port)
bool IsEnabledForROS(stream_id sensor_id)
std::optional< token_type > FindToken(stream_id id)
Token of an existing stream, or std::nullopt if id is unknown.
void CloseStream(carla::streaming::detail::stream_id_type id)
void EnableForROS(stream_id sensor_id)
void SetStreamAlias(stream_id alias, stream_id target)
low_level::Server< detail::tcp::Server >::protocol_type protocol_type
void SetROS2TopicVisibilityDefaultEnabled(bool enabled)
underlying_server _server
Server(const std::string &address, uint16_t port, const std::string &external_address, uint16_t external_port)
void AsyncRun(size_t worker_threads)
void DisableForROS(stream_id sensor_id)
void SetSynchronousMode(bool is_synchro)
auto GetLocalEndpoint() const
void SetSessionsUseStreamAliases(bool enabled)
Serializes a stream endpoint.
void CloseStream(carla::streaming::detail::stream_id_type id)
void SetSynchronousMode(bool is_synchro)
void SetTimeout(time_duration timeout)
void DisableForROS(stream_id sensor_id)
typename underlying_server::protocol_type protocol_type
token_type GetToken(stream_id sensor_id)
bool IsEnabledForROS(stream_id sensor_id)
underlying_server::endpoint GetLocalEndpoint() const
std::optional< stream_id > FindStreamAlias(stream_id alias)
void RemoveStreamAlias(stream_id alias)
std::optional< token_type > FindToken(stream_id id)
void EnableForROS(stream_id sensor_id)
void SetSessionsUseStreamAliases(bool enabled)
void SetROS2TopicVisibilityDefaultEnabled(bool enabled)
void SetStreamAlias(stream_id alias, stream_id target)
Positive time duration up to milliseconds resolution.
static auto make_endpoint(boost::asio::ip::basic_endpoint< Protocol > ep)
This file contains definitions of common data structures used in traffic manager.