When doing AIO on a UDP-style channel, only try to send up to one MTU at
a time. Also ensure that the poll callback is triggered every time
something is sent on UDP channels, since the AIO code relies heavily on
the poll callback to work.
todo = len;
}
+ if(connection->flags == UTCP_UDP) {
+ size_t pmtu = utcp_get_mtu(connection->utcp);
+
+ if(todo > pmtu) {
+ todo = pmtu;
+ }
+ }
+
if(aio->data) {
sent = utcp_send(connection, (char *)aio->data + aio->done, todo);
} else {
errno = EMSGSIZE;
return -1;
}
+
+ c->do_poll = true;
} else {
return 0;
}