pthread_mutex_unlock(&mesh->mutex);
}
-extern void meshlink_set_inviter_commits_first(struct meshlink_handle *mesh, bool inviter_commits_first) {
+void meshlink_reset_timers(struct meshlink_handle *mesh) {
+ if(!mesh) {
+ return;
+ }
+
+ if(pthread_mutex_lock(&mesh->mutex) != 0) {
+ abort();
+ }
+
+ handle_network_change(mesh, true);
+ pthread_mutex_unlock(&mesh->mutex);
+}
+
+void meshlink_set_inviter_commits_first(struct meshlink_handle *mesh, bool inviter_commits_first) {
if(!mesh) {
meshlink_errno = EINVAL;
return;
*/
void meshlink_set_dev_class_maxtimeout(struct meshlink_handle *mesh, dev_class_t devclass, int maxtimeout);
+/// Reset all connection timers
+/** This resets all timers related to connections, causing pending outgoing connections to be retried immediately.
+ * It also sends keepalive packets on all active connections immediately.
+ *
+ * \memberof meshlink_handle
+ * @param mesh A handle which represents an instance of MeshLink.
+ */
+void meshlink_reset_timers(struct meshlink_handle *mesh);
+
/// 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.
meshlink_open_ex
meshlink_open_params_free
meshlink_open_params_init
+meshlink_reset_timers
meshlink_send
meshlink_set_canonical_address
meshlink_set_channel_accept_cb