struct utcp *utcp = c->utcp;
+ if (utcp->retransmit) {
+ utcp->retransmit(c);
+ }
+
struct {
struct hdr hdr;
uint8_t data[];
}
}
+void utcp_set_retransmit_cb(struct utcp *utcp, utcp_retransmit_t retransmit) {
+ utcp->retransmit = retransmit;
+}
+
void utcp_set_clock_granularity(long granularity) {
CLOCK_GRANULARITY = granularity;
}
typedef bool (*utcp_pre_accept_t)(struct utcp *utcp, uint16_t port);
typedef void (*utcp_accept_t)(struct utcp_connection *utcp_connection, uint16_t port);
+typedef void (*utcp_retransmit_t)(struct utcp_connection *connection);
typedef ssize_t (*utcp_send_t)(struct utcp *utcp, const void *data, size_t len);
typedef ssize_t (*utcp_recv_t)(struct utcp_connection *connection, const void *data, size_t len);
extern void utcp_reset_timers(struct utcp *utcp);
extern void utcp_offline(struct utcp *utcp, bool offline);
+extern void utcp_set_retransmit_cb(struct utcp *utcp, utcp_retransmit_t retransmit);
// Per-socket options