X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeshlink%2B%2B.h;h=b27d9a8450debc55adb0549fdd7ffb64d7434b54;hb=d90d88adfbfc340e8eb473e0265f2741bf3f40a4;hp=bca39fd32332a2e3497e08a36f56c39056e49173;hpb=36a7403d3ab239a03c4085fa46f0df2127394a95;p=meshlink diff --git a/src/meshlink++.h b/src/meshlink++.h index bca39fd3..b27d9a84 100644 --- a/src/meshlink++.h +++ b/src/meshlink++.h @@ -823,6 +823,19 @@ public: meshlink_set_node_channel_timeout(handle, node, timeout); } + /// Set the flush timeout used for channels using message framing to the given node. + /** This sets the timeout after which UDP-style channels that use message framing will + flush partial packets. + * The timeout is set for all current and future channels to the given node. + * + * @param node The node to set the flush timeout for. + * @param timeout The timeout in milliseconds after which partial packets will be flushed. + * The default is 5 milliseconds. + */ + void set_node_flush_timeout(node *node, int timeout) { + meshlink_set_node_flush_timeout(handle, node, timeout); + } + /// Open a reliable stream channel to another node. /** This function is called whenever a remote node wants to open a channel to the local node. * The application then has to decide whether to accept or reject this channel.