aboutsummaryrefslogtreecommitdiff
path: root/node/node.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/node.hpp')
-rw-r--r--node/node.hpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/node/node.hpp b/node/node.hpp
index 3233ba2..1aad503 100644
--- a/node/node.hpp
+++ b/node/node.hpp
@@ -4,6 +4,7 @@
#include "receiver.hpp"
#include "senderreceiver.hpp"
#include "sender.hpp"
+#include "performanceclient.hpp"
#include "api.h"
#include "cmix.h"
@@ -12,6 +13,7 @@
#include <google/protobuf/arena.h>
#include <boost/asio/io_service.hpp>
+#include <boost/optional.hpp>
#include <list>
#include <string>
@@ -50,6 +52,16 @@ struct NodeNetworkSettings {
unsigned int minimum_nr_messages; ///< The minimum number of available messages before starting to run a mix;
};
+/*!
+ * \brief Details if and where to send performance data.
+ */
+struct PerformanceSettings {
+ bool run;
+ std::string host;
+ std::string port;
+ std::string name;
+};
+
template <typename T>
struct ArenaMessage {
google::protobuf::Arena arena;
@@ -76,6 +88,8 @@ class Node
typedef std::list<SSLReceiver> Purgatory;
Purgatory purgatory;
+ boost::optional<PerformanceClient> performance;
+
typedef std::map<std::string, SSLSenderReceiver> ClientConnections;
ClientConnections clients;
typedef std::map<std::string, CMixClientData> ClientData;
@@ -128,7 +142,7 @@ public:
* \param listen_settings The listen settings for the accepter.
* \param network_settings The network settings containing if we are first and who is the next node.
*/
- Node(ListenSettings const& listen_settings, NodeNetworkSettings network_settings);
+ Node(ListenSettings const& listen_settings, NodeNetworkSettings network_settings, PerformanceSettings performance_settings);
~Node();
/*!