]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink.h
Add meshlink_set_external_address_discovery_url().
[meshlink] / src / meshlink.h
index 8a3c1a19ab78fef1ee763faa522d48b8e9aa94a7..2877c64e6e1f1a3c4730cb1572566edd8de229e6 100644 (file)
@@ -1551,6 +1551,28 @@ 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);
+
+/// Set the URL used to discover the host's external address
+/** For generating invitation URLs, MeshLink can look up the externally visible address of the local node.
+ *  It does so by querying an external service. By default, this is http://meshlink.io/host.cgi.
+ *  Only URLs starting with http:// are supported.
+ *
+ *  \memberof meshlink_handle
+ *  @param mesh  A handle which represents an instance of MeshLink.
+ *  @param url   The URL to use for external address queries, or NULL to revert back to the default URL.
+ */
+extern void meshlink_set_external_address_discovery_url(struct meshlink_handle *mesh, const char *url);
+
 #ifdef __cplusplus
 }
 #endif