X-Git-Url: http://git.meshlink.io/?p=meshlink;a=blobdiff_plain;f=src%2Fmeshlink%2B%2B.h;h=ac72f3cc96f46a0438a24d567fa25688257a8ade;hp=37ca7e8b4d799281bcf0c86eeb0da1b60a3507af;hb=ecfe7cbbe08dc99ba6f329ad66bb8ee09ce9539b;hpb=28dcb47cfa2c9788eca533e9131573ac9830f2c7 diff --git a/src/meshlink++.h b/src/meshlink++.h index 37ca7e8b..ac72f3cc 100644 --- a/src/meshlink++.h +++ b/src/meshlink++.h @@ -691,6 +691,30 @@ public: return meshlink_channel_send(handle, channel, data, len); } + /// Get the amount of bytes in the send buffer. + /** This returns the amount of bytes in the send buffer. + * These bytes have not been received by the peer yet. + * + * @param channel A handle for the channel. + * + * @return The amount of un-ACKed bytes in the send buffer. + */ + size_t channel_get_sendq(channel *channel) { + return meshlink_channel_get_sendq(handle, channel); + } + + /// Get the amount of bytes in the receive buffer. + /** This returns the amount of bytes in the receive buffer. + * These bytes have not been processed by the application yet. + * + * @param channel A handle for the channel. + * + * @return The amount of bytes in the receive buffer. + */ + size_t channel_get_recvq(channel *channel) { + return meshlink_channel_get_recvq(handle, channel); + } + /// Enable or disable zeroconf discovery of local peers /** This controls whether zeroconf discovery using the Catta library will be * enabled to search for peers on the local network. By default, it is enabled.