13 #include <boost/asio/io_context.hpp> 33 template <
typename InternalEPType,
typename ExternalEPType>
35 boost::asio::io_context &io_context,
43 template <
typename InternalEPType>
45 boost::asio::io_context &io_context,
52 template <
typename... EPArgs>
53 explicit Server(boost::asio::io_context &io_context, EPArgs &&... args)
57 return _server.GetLocalEndpoint();
73 _server.SetSynchronousMode(is_synchro);
83 auto on_session_opened = [
this](
auto session) {
88 auto on_session_closed = [
this](
auto session) {
92 _server.Listen(on_session_opened, on_session_closed);
Server(boost::asio::io_context &io_context, EPArgs &&... args)
A low-level streaming server.
carla::streaming::detail::token_type GetToken(carla::streaming::detail::stream_id_type sensor_id)
boost::asio::ip::tcp::endpoint endpoint
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)
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)
Keeps the mapping between streams and sessions.
void SetTimeout(time_duration timeout)
void SetSynchronousMode(bool is_synchro)
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
Server(boost::asio::io_context &io_context, detail::EndPoint< protocol_type, InternalEPType > internal_ep, detail::EndPoint< protocol_type, ExternalEPType > external_ep)