utcp_get_sendq() returns the amount of bytes in the send buffer, which
corresponds to the amount of bytes not yet ACKed by the peer.
utcp_get_recvq() returns the amount of bytes in the receive buffer,
which may or may not have been acked already, but have not been read by
the application.
}
}
+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;
}
extern void utcp_set_rcvbuf(struct utcp_connection *connection, size_t size);
extern size_t utcp_get_rcvbuf_free(struct utcp_connection *connection);
+extern size_t utcp_get_sendq(struct utcp_connection *connection);
+extern size_t utcp_get_recvq(struct utcp_connection *connection);
+
extern bool utcp_get_nodelay(struct utcp_connection *connection);
extern void utcp_set_nodelay(struct utcp_connection *connection, bool nodelay);