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));
std::function< void(std::shared_ptr< Primary >, carla::Buffer)> callback_function_type_response
void OpenSession(time_duration timeout, callback_function_type on_session_opened, callback_function_type on_session_closed, callback_function_type_response on_response)
endpoint::protocol_type protocol_type
boost::asio::io_context & _io_context
std::function< void(std::shared_ptr< Primary >)> callback_function_type
boost::asio::ip::tcp::acceptor _acceptor
endpoint GetLocalEndpoint() const
This file contains definitions of common data structures used in traffic manager. ...
std::atomic< time_duration > _timeout
std::deque< std::shared_ptr< SimpleWaypoint > > Buffer
std::shared_ptr< Primary > Session
boost::asio::ip::tcp::endpoint endpoint
void SetTimeout(time_duration timeout)
Set session time-out.
Listener(boost::asio::io_context &io_context, endpoint ep)
Positive time duration up to milliseconds resolution.
Inherit (privately) to suppress copy/move construction and assignment.
void Listen(callback_function_type on_session_opened, callback_function_type on_session_closed, callback_function_type_response on_response)
Start listening for connections.