free(utcp);
}
+void utcp_set_mtu(struct utcp *utcp, uint16_t mtu) {
+ // TODO: handle overhead of the header
+ utcp->mtu = mtu;
+}
+
int utcp_set_connection_timeout(struct utcp *u, int timeout) {
int prev = u->timeout;
u->timeout = timeout;
extern struct utcp *utcp_init(utcp_accept_t accept, utcp_pre_accept_t pre_accept, utcp_send_t send, void *priv);
extern void utcp_exit(struct utcp *utcp);
+
+extern void utcp_set_mtu(struct utcp *utcp, uint16_t mtu);
+
extern struct utcp_connection *utcp_connect(struct utcp *utcp, uint16_t port, utcp_recv_t recv, void *priv);
extern void utcp_accept(struct utcp_connection *utcp, utcp_recv_t recv, void *priv);
extern ssize_t utcp_send(struct utcp_connection *connection, const void *data, size_t len);