From 85665003a7d9e013b1d7df5578dbf47ddf81b236 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 6 Dec 2018 18:04:33 +0000 Subject: epee: better network buffer data structure avoids pointless allocs and memcpy --- src/p2p/net_node.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/p2p/net_node.h') diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h index 8930418bd..46f560615 100644 --- a/src/p2p/net_node.h +++ b/src/p2p/net_node.h @@ -180,10 +180,10 @@ namespace nodetool virtual void on_connection_close(p2p_connection_context& context); virtual void callback(p2p_connection_context& context); //----------------- i_p2p_endpoint ------------------------------------------------------------- - virtual bool relay_notify_to_list(int command, const std::string& data_buff, const std::list &connections); - virtual bool relay_notify_to_all(int command, const std::string& data_buff, const epee::net_utils::connection_context_base& context); - virtual bool invoke_command_to_peer(int command, const std::string& req_buff, std::string& resp_buff, const epee::net_utils::connection_context_base& context); - virtual bool invoke_notify_to_peer(int command, const std::string& req_buff, const epee::net_utils::connection_context_base& context); + virtual bool relay_notify_to_list(int command, const epee::span data_buff, const std::list &connections); + virtual bool relay_notify_to_all(int command, const epee::span data_buff, const epee::net_utils::connection_context_base& context); + virtual bool invoke_command_to_peer(int command, const epee::span req_buff, std::string& resp_buff, const epee::net_utils::connection_context_base& context); + virtual bool invoke_notify_to_peer(int command, const epee::span req_buff, const epee::net_utils::connection_context_base& context); virtual bool drop_connection(const epee::net_utils::connection_context_base& context); virtual void request_callback(const epee::net_utils::connection_context_base& context); virtual void for_each_connection(std::function f); -- cgit v1.2.3