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...);
Inherit (privately) to suppress copy/move construction and assignment.
A thread pool based on Boost.Asio's io context.
std::function< void(MultiGPUCommand, carla::Buffer)> callback_type
boost::asio::ip::tcp::endpoint _endpoint
boost::asio::ip::tcp::endpoint endpoint
std::shared_ptr< BufferPool > _buffer_pool
Secondary(boost::asio::ip::tcp::endpoint ep, SecondaryCommands::callback_type callback)
boost::asio::io_context::strand _strand
SecondaryCommands _commander
boost::asio::ip::tcp::socket _socket
SecondaryCommands & GetCommander()
void AsyncRun(size_t worker_threads)
boost::asio::deadline_timer _connection_timer
static auto MakeMessage(Buffers... buffers)
void Write(std::shared_ptr< const carla::streaming::detail::tcp::Message > message)
endpoint::protocol_type protocol_type
This file contains definitions of common data structures used in traffic manager.
std::shared_ptr< BufferView > SharedBufferView