X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeshlink.h;h=8293da0ff6aacfa64ed0903af2f38ce84d69f60c;hb=fcd0a7b8c0a823aaa4f9b885a408969b7dc16e00;hp=f504497562cf723c3e8d4f2a28315b84ea840e7e;hpb=8d4b96efb7955eaa96174af4804597f92e124041;p=meshlink diff --git a/src/meshlink.h b/src/meshlink.h index f5044975..8293da0f 100644 --- a/src/meshlink.h +++ b/src/meshlink.h @@ -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,25 @@ 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); + +/// 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.