]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink.h
Don't use assert() to check the results of pthread_*() calls.
[meshlink] / src / meshlink.h
index f504497562cf723c3e8d4f2a28315b84ea840e7e..e0164b7fd7e8bae111743d65484c21d35a40790b 100644 (file)
@@ -71,7 +71,7 @@ typedef enum {
        MESHLINK_EPEER,        ///< A peer caused an error
        MESHLINK_ENOTSUP,      ///< The operation is not supported in the current configuration of MeshLink
        MESHLINK_EBUSY,        ///< The MeshLink instance is already in use by another process
-       MESHLINK_EBLACKLISTED, ///< The operation is not allowed because the node is blacklisted
+       MESHLINK_EBLACKLISTED  ///< The operation is not allowed because the node is blacklisted
 } meshlink_errno_t;
 
 /// Device class
@@ -1589,6 +1589,16 @@ void meshlink_set_dev_class_timeouts(struct meshlink_handle *mesh, dev_class_t d
  */
 void meshlink_set_dev_class_fast_retry_period(struct meshlink_handle *mesh, dev_class_t devclass, int fast_retry_period);
 
+/// Set device class maximum timeout
+/** This sets the maximum timeout for outgoing connection retries for a given device class.
+ *
+ *  \memberof meshlink_handle
+ *  @param mesh          A handle which represents an instance of MeshLink.
+ *  @param devclass      The device class to update
+ *  @param maxtimeout    The maximum timeout between reconnection attempts, in seconds. The default is 900.
+ */
+void meshlink_set_dev_class_maxtimeout(struct meshlink_handle *mesh, dev_class_t devclass, int maxtimeout);
+
 /// 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.