X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeshlink.h;fp=src%2Fmeshlink.h;h=cece7f8df2834335a6ca079d63418390964c4100;hb=d90d88adfbfc340e8eb473e0265f2741bf3f40a4;hp=f504497562cf723c3e8d4f2a28315b84ea840e7e;hpb=36a7403d3ab239a03c4085fa46f0df2127394a95;p=meshlink diff --git a/src/meshlink.h b/src/meshlink.h index f5044975..cece7f8d 100644 --- a/src/meshlink.h +++ b/src/meshlink.h @@ -1530,6 +1530,19 @@ size_t meshlink_channel_get_mss(struct meshlink_handle *mesh, struct meshlink_ch */ void meshlink_set_node_channel_timeout(struct meshlink_handle *mesh, struct meshlink_node *node, int 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. + * + * \memberof meshlink_node + * @param mesh A handle which represents an instance of MeshLink. + * @param node A pointer to a struct meshlink_node describing the node to set the channel connection timeout for. + * @param timeout The timeout in milliseconds after which partial packets will be flushed. + * The default is 5 milliseconds. + */ +void meshlink_set_node_flush_timeout(struct meshlink_handle *mesh, struct meshlink_node *node, int timeout); + /// Hint that a hostname may be found at an address /** This function indicates to meshlink that the given hostname is likely found * at the given IP address and port.