13#include <boost/asio/io_context.hpp>
37 template <
typename InternalEPType,
typename ExternalEPType>
39 boost::asio::io_context &io_context,
47 template <
typename InternalEPType>
49 boost::asio::io_context &io_context,
56 template <
typename... EPArgs>
57 explicit Server(boost::asio::io_context &io_context, EPArgs &&... args)
61 return _server.GetLocalEndpoint();
77 _server.SetSynchronousMode(is_synchro);
99 auto on_session_opened = [
this](
auto session) {
104 auto on_session_closed = [
this](
auto session) {
108 _server.Listen(on_session_opened, on_session_closed);
Keeps the mapping between streams and sessions.
void DeregisterSession(std::shared_ptr< Session > session)
carla::streaming::Stream MakeStream()
bool RegisterSession(std::shared_ptr< Session > session)
void DisableForROS(stream_id_type sensor_id)
bool IsEnabledForROS(stream_id_type sensor_id)
void CloseStream(carla::streaming::detail::stream_id_type id)
void EnableForROS(stream_id_type sensor_id)
token_type GetToken(stream_id_type sensor_id)
Serializes a stream endpoint.
A low-level streaming server.
Server(boost::asio::io_context &io_context, detail::EndPoint< protocol_type, InternalEPType > internal_ep, detail::EndPoint< protocol_type, ExternalEPType > external_ep)
detail::Dispatcher _dispatcher
void CloseStream(carla::streaming::detail::stream_id_type id)
void SetSynchronousMode(bool is_synchro)
carla::streaming::detail::stream_id_type stream_id
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)
Server(boost::asio::io_context &io_context, EPArgs &&... args)
bool IsEnabledForROS(stream_id sensor_id)
Server(boost::asio::io_context &io_context, detail::EndPoint< protocol_type, InternalEPType > internal_ep)
underlying_server _server
underlying_server::endpoint GetLocalEndpoint() const
void EnableForROS(stream_id sensor_id)
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.
static void log_debug(Args &&... args)