summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-11-05 12:22:58 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-11-05 12:22:58 -0800
commit8ef4edebbfeead53e5b2b454086e21e42e809aab (patch)
tree83ee9e9c362dd31f4225e99a67f52d9538d3ae6e /include
parenta95ff21aafa793e5282f32b77b893da3f42a4a57 (diff)
downloadinfinitytier-8ef4edebbfeead53e5b2b454086e21e42e809aab.tar.gz
infinitytier-8ef4edebbfeead53e5b2b454086e21e42e809aab.zip
Deferred decode for HELLO to prevent HELLOcalypse under high load of new peers.
Diffstat (limited to 'include')
-rw-r--r--include/ZeroTierOne.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/ZeroTierOne.h b/include/ZeroTierOne.h
index e9b38c52..fd7857d9 100644
--- a/include/ZeroTierOne.h
+++ b/include/ZeroTierOne.h
@@ -1512,6 +1512,27 @@ void ZT_Node_clusterHandleIncomingMessage(ZT_Node *node,const void *msg,unsigned
void ZT_Node_clusterStatus(ZT_Node *node,ZT_ClusterStatus *cs);
/**
+ * Do things in the background until Node dies
+ *
+ * This function can be called from one or more background threads to process
+ * certain tasks in the background to improve foreground performance. It will
+ * not return until the Node is shut down. If threading is not enabled in
+ * this build it will return immediately and will do nothing.
+ *
+ * This is completely optional. If this is never called, all processing is
+ * done in the foreground in the various processXXXX() methods.
+ *
+ * This does NOT replace or eliminate the need to call the normal
+ * processBackgroundTasks() function in your main loop. This mechanism is
+ * used to offload the processing of expensive mssages onto background
+ * handler threads to prevent foreground performance degradation under
+ * high load.
+ *
+ * @param node Node instance
+ */
+void ZT_Node_backgroundThreadMain(ZT_Node *node);
+
+/**
* Get ZeroTier One version
*
* @param major Result: major version