meshlink_set_scheduling_granularity(handle, granularity);
}
+ /// Sets the storage policy used by MeshLink
+ /** This sets the policy MeshLink uses when it has new information about nodes.
+ * By default, all udpates will be stored to disk (unless an ephemeral instance has been opened).
+ * Setting the policy to MESHLINK_STORAGE_KEYS_ONLY, only updates that contain new keys for nodes
+ * are stored, as well as blacklist/whitelist settings.
+ * By setting the policy to MESHLINK_STORAGE_DISABLED, no updates will be stored.
+ *
+ * @param policy The storage policy to use.
+ */
+ void set_storage_policy(meshlink_storage_policy_t policy) {
+ meshlink_set_storage_policy(handle, policy);
+ }
+
/// Invite another node into the mesh.
/** This function generates an invitation that can be used by another node to join the same mesh as the local node.
* The generated invitation is a string containing a URL.
meshlink_enable_discovery(handle, enable);
}
+ /// Inform MeshLink that the local network configuration might have changed
+ /** This is intended to be used when there is no way for MeshLink to get notifications of local network changes.
+ * It forces MeshLink to scan all network interfaces for changes in up/down status and new/removed addresses,
+ * and will immediately check if all connections to other nodes are still alive.
+ */
+ void hint_network_change() {
+ meshlink_hint_network_change(handle);
+ }
+
/// Set device class timeouts
/** This sets the ping interval and timeout for a given device class.
*