]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink.h
Make the join commit order configurable.
[meshlink] / src / meshlink.h
index 8a3c1a19ab78fef1ee763faa522d48b8e9aa94a7..385c12cec44b17f5a5609e62d5ad42b6607ba507 100644 (file)
@@ -1551,6 +1551,17 @@ extern void meshlink_set_dev_class_timeouts(struct meshlink_handle *mesh, dev_cl
  */
 extern void meshlink_set_dev_class_fast_retry_period(struct meshlink_handle *mesh, dev_class_t devclass, int fast_retry_period);
 
+/// Set which order invitations are committed
+/** This determines in which order configuration files are written to disk during an invitation.
+ *  By default, the invitee saves the configuration to disk first, then the inviter.
+ *  By calling this function with @a inviter_commits_first set to true, the order is reversed.
+ *
+ *  \memberof meshlink_handle
+ *  @param mesh               A handle which represents an instance of MeshLink.
+ *  @param inviter_commits_first  If true, then the node that invited a peer will commit data to disk first.
+ */
+extern void meshlink_set_inviter_commits_first(struct meshlink_handle *mesh, bool inviter_commits_first);
+
 #ifdef __cplusplus
 }
 #endif