]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink++.h
Add meshlink_set_external_address_discovery_url().
[meshlink] / src / meshlink++.h
index 4d900448baae145a0b91616190d09c8e5766328e..11e7eabb99d71dc260acfd9c413dd00a21a71b5b 100644 (file)
@@ -1030,6 +1030,17 @@ public:
                meshlink_set_inviter_commits_first(handle, 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.
+        *
+        *  @param url   The URL to use for external address queries, or NULL to revert back to the default URL.
+        */
+       void set_external_address_discovery_url(const char *url) {
+               meshlink_set_external_address_discovery_url(handle, url);
+       }
+
 private:
        // non-copyable:
        mesh(const mesh &) /* TODO: C++11: = delete */;