aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/p2p/net_node_common.h')
-rw-r--r--src/p2p/net_node_common.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/p2p/net_node_common.h b/src/p2p/net_node_common.h
index 5e7645365..6aba7aa24 100644
--- a/src/p2p/net_node_common.h
+++ b/src/p2p/net_node_common.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2016, The Monero Project
+// Copyright (c) 2014-2017, The Monero Project
//
// All rights reserved.
//
@@ -43,13 +43,14 @@ namespace nodetool
template<class t_connection_context>
struct i_p2p_endpoint
{
+ virtual bool relay_notify_to_list(int command, const std::string& data_buff, const std::list<boost::uuids::uuid>& connections)=0;
virtual bool relay_notify_to_all(int command, const std::string& data_buff, const epee::net_utils::connection_context_base& context)=0;
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)=0;
virtual bool invoke_notify_to_peer(int command, const std::string& req_buff, const epee::net_utils::connection_context_base& context)=0;
virtual bool drop_connection(const epee::net_utils::connection_context_base& context)=0;
virtual void request_callback(const epee::net_utils::connection_context_base& context)=0;
virtual uint64_t get_connections_count()=0;
- virtual void for_each_connection(std::function<bool(t_connection_context&, peerid_type)> f)=0;
+ virtual void for_each_connection(std::function<bool(t_connection_context&, peerid_type, uint32_t)> f)=0;
virtual bool block_ip(uint32_t adress, time_t seconds = 0)=0;
virtual bool unblock_ip(uint32_t adress)=0;
virtual std::map<uint32_t, time_t> get_blocked_ips()=0;
@@ -59,6 +60,10 @@ namespace nodetool
template<class t_connection_context>
struct p2p_endpoint_stub: public i_p2p_endpoint<t_connection_context>
{
+ virtual bool relay_notify_to_list(int command, const std::string& data_buff, const std::list<boost::uuids::uuid>& connections)
+ {
+ return false;
+ }
virtual bool relay_notify_to_all(int command, const std::string& data_buff, const epee::net_utils::connection_context_base& context)
{
return false;
@@ -79,7 +84,7 @@ namespace nodetool
{
}
- virtual void for_each_connection(std::function<bool(t_connection_context&,peerid_type)> f)
+ virtual void for_each_connection(std::function<bool(t_connection_context&,peerid_type,uint32_t)> f)
{
}