19 #include <boost/asio/deadline_timer.hpp> 20 #include <boost/asio/io_context.hpp> 21 #include <boost/asio/ip/tcp.hpp> 22 #include <boost/asio/strand.hpp> 35 :
public std::enable_shared_from_this<Secondary>,
40 using endpoint = boost::asio::ip::tcp::endpoint;
51 void AsyncRun(
size_t worker_threads);
53 void Write(std::shared_ptr<const carla::streaming::detail::tcp::Message> message);
55 void Write(std::string text);
61 template <
typename... Buffers>
65 "This function only accepts arguments of type BufferView.");
66 return std::make_shared<const carla::streaming::detail::tcp::Message>(buffers...);
boost::asio::io_context::strand _strand
SecondaryCommands _commander
boost::asio::ip::tcp::endpoint endpoint
This file contains definitions of common data structures used in traffic manager. ...
boost::asio::ip::tcp::endpoint _endpoint
boost::asio::deadline_timer _connection_timer
std::function< void(MultiGPUCommand, carla::Buffer)> callback_type
void AsyncRun(size_t worker_threads)
Secondary(boost::asio::ip::tcp::endpoint ep, SecondaryCommands::callback_type callback)
static auto MakeMessage(Buffers... buffers)
void Write(std::shared_ptr< const carla::streaming::detail::tcp::Message > message)
A thread pool based on Boost.Asio's io context.
std::shared_ptr< BufferPool > _buffer_pool
boost::asio::ip::tcp::socket _socket
SecondaryCommands & GetCommander()
Inherit (privately) to suppress copy/move construction and assignment.
endpoint::protocol_type protocol_type