Closed devsnek closed 5 months ago
We had this in the past; see https://github.com/quinn-rs/quinn/pull/555 for discussion. It sounds like both behaviors are desirable in different cases. I'm not opposed to having APIs to support both (especially as tokio::Notify
makes multi-waiter APIs much easier than they were in the past), but we shouldn't lose the current functionality.
A few notes to consider:
I'd like to wait for free space in the datagram outgoing queue, instead of silently dropping other datagrams. In my mind,
send_datagram
should return a future you can poll, but that would replace the existing behavior which drops them. Would it be okay to do so? Or would it be better to add a new function likepoll_wait_for_datagram_queue_available(len)
?