+ // Custom rate limiting (can be connected to signals)
+
+ /**
+ * Update rate limiting according to Network configuration
+ *
+ * Updates the token bucket and message queue timer according to the network configuration, such
+ * as on first load, or after changing settings.
+ *
+ * Calling this will reset any ongoing queue delays. If messages exist in the queue when rate
+ * limiting is disabled, messages will be quickly sent (100 ms) with new messages queued to send
+ * until the queue is cleared.
+ *
+ * @see Network::useCustomMessageRate()
+ * @see Network::messageRateBurstSize()
+ * @see Network::messageRateDelay()
+ * @see Network::unlimitedMessageRate()
+ *
+ * @param[in] forceUnlimited
+ * @parmblock
+ * If true, override user settings to disable message rate limiting, otherwise apply rate limits
+ * set by the user. Use with caution and remember to re-enable configured limits when done.
+ * @endparmblock
+ */
+ void updateRateLimiting(const bool forceUnlimited = false);
+
+ /**
+ * Resets the token bucket up to the maximum
+ *
+ * Call this if the connection's been reset after calling updateRateLimiting() if needed.
+ *
+ * @see CoreNetwork::updateRateLimiting()
+ */
+ void resetTokenBucket();
+