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);
Server(boost::asio::io_context &io_context, EPArgs &&... args)
A low-level streaming server.
boost::asio::ip::tcp::endpoint endpoint
void DisableForROS(stream_id sensor_id)
This file contains definitions of common data structures used in traffic manager. ...
detail::Dispatcher _dispatcher
static auto make_endpoint(boost::asio::ip::basic_endpoint< Protocol > ep)
static void log_debug(Args &&...)
token_type GetToken(stream_id_type sensor_id)
carla::streaming::detail::stream_id_type stream_id
void CloseStream(carla::streaming::detail::stream_id_type id)
Serializes a stream endpoint.
void DeregisterSession(std::shared_ptr< Session > session)
underlying_server _server
bool RegisterSession(std::shared_ptr< Session > session)
void EnableForROS(stream_id_type sensor_id)
void EnableForROS(stream_id sensor_id)
token_type GetToken(stream_id sensor_id)
void DisableForROS(stream_id_type sensor_id)
Keeps the mapping between streams and sessions.
void SetTimeout(time_duration timeout)
void SetSynchronousMode(bool is_synchro)
bool IsEnabledForROS(stream_id sensor_id)
bool IsEnabledForROS(stream_id_type sensor_id)
typename underlying_server::protocol_type protocol_type
Positive time duration up to milliseconds resolution.
carla::streaming::Stream MakeStream()
void CloseStream(carla::streaming::detail::stream_id_type id)
Server(boost::asio::io_context &io_context, detail::EndPoint< protocol_type, InternalEPType > internal_ep)
underlying_server::endpoint GetLocalEndpoint() const
endpoint::protocol_type protocol_type
carla::streaming::detail::token_type token_type
Server(boost::asio::io_context &io_context, detail::EndPoint< protocol_type, InternalEPType > internal_ep, detail::EndPoint< protocol_type, ExternalEPType > external_ep)