#pragma once #include #include #include #include #include "behavior/tasks/types.hpp" /** * Contains common information about a certain peer. * All the information contained here are "public": they can be communicated to anybody else safely. */ class Peer { public: Peer(); explicit Peer(const std::array& cryptoRsaPublicKey); std::uint32_t id; bool serverEnabled; drp::task::TaskType status; std::uint8_t channel; std::chrono::high_resolution_clock::duration latencyAverage {}; std::array cryptoRsaPublicKey {}; private: // random static std::random_device randomDevice; static std::mt19937 randomGenerator; static std::uniform_int_distribution randomDistribution; };