init
This commit is contained in:
18
src/solanaceae/tox_p2prng/p2prng.hpp
Normal file
18
src/solanaceae/tox_p2prng/p2prng.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <solanaceae/contact/contact_model3.hpp>
|
||||
#include <solanaceae/util/span.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
// general p2prng interface
|
||||
struct P2PRNGI {
|
||||
// returns unique id, you can then use when listen to events
|
||||
// chooses peers depending on C, if C is a group it (tries?) to use everyone?
|
||||
virtual std::vector<uint8_t> newGernation(Contact3Handle c, const ByteSpan initial_state_user_data) = 0;
|
||||
// manually tell it which peers to use
|
||||
virtual std::vector<uint8_t> newGernationPeers(const std::vector<Contact3Handle>& c_vec, const ByteSpan initial_state_user_data) = 0;
|
||||
|
||||
// TODO: events
|
||||
};
|
||||
Reference in New Issue
Block a user