X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeshlink.h;h=385c12cec44b17f5a5609e62d5ad42b6607ba507;hb=2224a56ea44bffdafbe29ba7b74d1a0adb0cbd95;hp=8a3c1a19ab78fef1ee763faa522d48b8e9aa94a7;hpb=902446edf822a32383c4fa4b7c13b83a568095ad;p=meshlink diff --git a/src/meshlink.h b/src/meshlink.h index 8a3c1a19..385c12ce 100644 --- a/src/meshlink.h +++ b/src/meshlink.h @@ -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