-
-
Notifications
You must be signed in to change notification settings - Fork 487
Open
Description
Hello Team!
At the moment quinn, on datagrams, offers:
send_datagram- which overwrites datagrams in the send buffersend_datagram_wait- which waits until the datagram can be enqueuedread_datagram- which waits until a datagram has been received
These functions all require:
- The buffer which should possibly be sent/received on at that moment to already exist -> Possibly wasted work
- The caller to wait for them/ or accepting data to be lost -> Caller has no control
With this, the User lacks some low level control over the Connection.
I would like to propose adding:
poll_send_datagram- checking if send is blocked, and if so registering the poller with the datagrams_unblocked notifier.poll_read_datagram- checking if receive is blocked, and if so registering the poller with the datagrams_received notifier.
For higher level integration and for the caller to attempt operation without side effect on fail:
try_send_datagram\try_receive_datagram- returning aWouldBlockif operation can not be handled without waiting
This would allow a user to check the state of the socket, and decide what to do based on this.
Especially latency sensitive applications or ones which have do internal congestion control could profit from this.
Metadata
Metadata
Assignees
Labels
No labels