X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeshlink%2B%2B.h;h=5550a9e302339c02a2ce5a66862072384d86ee62;hb=b1cae6a2011f704dc4d3b02972def561d5c6bcb9;hp=7877aeca22becc6d0e32c67abf9e10b67cc99460;hpb=c023ad12147aa88810629c110ea6b1ab94267196;p=meshlink diff --git a/src/meshlink++.h b/src/meshlink++.h index 7877aeca..5550a9e3 100644 --- a/src/meshlink++.h +++ b/src/meshlink++.h @@ -871,6 +871,16 @@ public: meshlink_enable_discovery(handle, enable); } + /// Set device class timeouts + /** This sets the ping interval and timeout for a given device class. + * + * @param devclass The device class to update + * @param pinginterval The interval between keepalive packets, in seconds. The default is 60. + * @param pingtimeout The required time within which a peer should respond, in seconds. The default is 5. + * The timeout must be smaller than the interval. + */ + void set_dev_class_timeouts(dev_class_t devclass, int pinginterval, int pingtimeout); + private: // non-copyable: mesh(const mesh &) /* TODO: C++11: = delete */;