]> git.meshlink.io Git - utcp/blobdiff - utcp.c
Add functions to get the amount of bytes in the send and receive buffers.
[utcp] / utcp.c
diff --git a/utcp.c b/utcp.c
index 9fb68aecd323dd2019171df1b86199c37af71544..4875f8405ef7799aa5a935b3d1910a88d668f2a6 100644 (file)
--- a/utcp.c
+++ b/utcp.c
@@ -1930,6 +1930,14 @@ void utcp_set_rcvbuf(struct utcp_connection *c, size_t size) {
        }
 }
 
+size_t utcp_get_sendq(struct utcp_connection *c) {
+       return c->sndbuf.used;
+}
+
+size_t utcp_get_recvq(struct utcp_connection *c) {
+       return c->rcvbuf.used;
+}
+
 bool utcp_get_nodelay(struct utcp_connection *c) {
        return c ? c->nodelay : false;
 }