X-Git-Url: http://git.meshlink.io/?p=meshlink;a=blobdiff_plain;f=src%2Fmeshlink.h;h=5390c4e8645c9e30ce0db49162f0b9e016f5850e;hp=13976266652296e67477447ff1dfb1e483a1dc1d;hb=7212e13585536500c61c458e6d55e723183e4a5b;hpb=4c57e6902219ecca1872e18e34365d8e54a0f407 diff --git a/src/meshlink.h b/src/meshlink.h index 13976266..5390c4e8 100644 --- a/src/meshlink.h +++ b/src/meshlink.h @@ -1504,6 +1504,17 @@ extern size_t meshlink_channel_get_sendq(struct meshlink_handle *mesh, struct me */ extern size_t meshlink_channel_get_recvq(struct meshlink_handle *mesh, struct meshlink_channel *channel) __attribute__((__warn_unused_result__)); +/// Get the maximum segment size of a channel. +/** This returns the amount of bytes that can be sent at once for channels with UDP semantics. + * + * \memberof meshlink_channel + * @param mesh A handle which represents an instance of MeshLink. + * @param channel A handle for the channel. + * + * @return The amount of bytes in the receive buffer. + */ +extern size_t meshlink_channel_get_mss(struct meshlink_handle *mesh, struct meshlink_channel *channel) __attribute__((__warn_unused_result__)); + /// Set the connection timeout used for channels to the given node. /** This sets the timeout after which unresponsive channels will be reported as closed. * The timeout is set for all current and future channels to the given node.