+}
+
+size_t utcp_get_sndbuf(struct utcp_connection *c) {
+ return c->maxsndbufsize;
+}
+
+size_t utcp_get_sndbuf_free(struct utcp_connection *c) {
+ return c->maxsndbufsize - c->sndbufsize;
+}
+
+void utcp_set_sndbuf(struct utcp_connection *c, size_t size) {
+ c->maxsndbufsize = size;
+ if(c->maxsndbufsize != size)
+ c->maxsndbufsize = -1;
+}
+
+bool utcp_get_nodelay(struct utcp_connection *c) {
+ return c->nodelay;
+}
+
+void utcp_set_nodelay(struct utcp_connection *c, bool nodelay) {
+ c->nodelay = nodelay;
+}
+
+bool utcp_get_keepalive(struct utcp_connection *c) {
+ return c->keepalive;
+}
+
+void utcp_set_keepalive(struct utcp_connection *c, bool keepalive) {
+ c->keepalive = keepalive;
+}
+
+size_t utcp_get_outq(struct utcp_connection *c) {
+ return seqdiff(c->snd.nxt, c->snd.una);
+}
+
+void utcp_set_recv_cb(struct utcp_connection *c, utcp_recv_t recv) {
+ c->recv = recv;
+}
+
+void utcp_set_poll_cb(struct utcp_connection *c, utcp_poll_t poll) {
+ c->poll = poll;