13#include <boost/asio/io_context.hpp>
14#include <boost/asio/ip/tcp.hpp>
15#include <boost/asio/post.hpp>
29 using endpoint = boost::asio::ip::tcp::endpoint;
57 std::move(on_session_opened),
58 std::move(on_session_closed),
59 std::move(on_response));
Inherit (privately) to suppress copy/move construction and assignment.
boost::asio::io_context & _io_context
std::atomic< time_duration > _timeout
endpoint GetLocalEndpoint() const
std::shared_ptr< Primary > Session
boost::asio::ip::tcp::endpoint endpoint
boost::asio::ip::tcp::acceptor _acceptor
void Listen(callback_function_type on_session_opened, callback_function_type on_session_closed, callback_function_type_response on_response)
Start listening for connections.
void SetTimeout(time_duration timeout)
Set session time-out.
endpoint::protocol_type protocol_type
std::function< void(std::shared_ptr< Primary >)> callback_function_type
void OpenSession(time_duration timeout, callback_function_type on_session_opened, callback_function_type on_session_closed, callback_function_type_response on_response)
std::function< void(std::shared_ptr< Primary >, carla::Buffer)> callback_function_type_response
Listener(boost::asio::io_context &io_context, endpoint ep)
Positive time duration up to milliseconds resolution.
This file contains definitions of common data structures used in traffic manager.