mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-19 13:01:39 -07:00
.
This commit is contained in:
parent
baa10c2995
commit
2f20258807
16 changed files with 239 additions and 423 deletions
|
|
@ -51,6 +51,8 @@
|
|||
#include "Mutex.hpp"
|
||||
#include "NonCopyable.hpp"
|
||||
|
||||
#define ZT_PEER_MAX_SERIALIZED_STATE_SIZE (sizeof(Peer) + 32 + (sizeof(Path) * 2))
|
||||
|
||||
namespace ZeroTier {
|
||||
|
||||
/**
|
||||
|
|
@ -194,9 +196,10 @@ public:
|
|||
bool doPingAndKeepalive(void *tPtr,uint64_t now,int inetAddressFamily);
|
||||
|
||||
/**
|
||||
* Write current peer state to external storage / cluster network
|
||||
* Write object state to external storage and/or cluster network
|
||||
*
|
||||
* @param tPtr Thread pointer to be handed through to any callbacks called as a result of this call
|
||||
* @param now Current time
|
||||
*/
|
||||
void writeState(void *tPtr,const uint64_t now);
|
||||
|
||||
|
|
@ -437,6 +440,17 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a peer from a remote state update
|
||||
*
|
||||
* @param renv Runtime environment
|
||||
* @param tPtr Thread pointer to be handed through to any callbacks called as a result of this call
|
||||
* @param data State update data
|
||||
* @param len State update length
|
||||
* @return Peer or NULL if data was invalid
|
||||
*/
|
||||
static SharedPtr<Peer> createFromStateUpdate(const RuntimeEnvironment *renv,void *tPtr,const void *data,unsigned int len);
|
||||
|
||||
private:
|
||||
struct _PeerPath
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue