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;
53 void AsyncRun(
size_t worker_threads);
55 void Write(std::shared_ptr<const carla::streaming::detail::tcp::Message> message);
57 void Write(std::string text);
64 template <
typename... Buffers>
68 "This function only accepts arguments of type BufferView.");
69 return std::make_shared<const carla::streaming::detail::tcp::Message>(buffers...);
包含 Carla 框架中与网络流相关的类和函数的声明。
一块原始数据。 请注意,如果需要更多容量,则会分配一个新的内存块,并 删除旧的内存块。这意味着默认情况下,缓冲区只能增长。要释放内存,使用 clear 或 pop。
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
包含CARLA流处理相关头文件和Boost.Asio网络库头文件。 包含CARLA的调试功能相关定义。 包含CARLA流处理的端点(EndPoint)类定义。 包含CARLA流处理的令牌(Token)类...
std::shared_ptr< BufferView > SharedBufferView