-
Notifications
You must be signed in to change notification settings - Fork 123
Sending datagrams is asynchronous. #307
Copy link
Copy link
Open
Labels
A-h3-datagramArea: h3-datagram crateArea: h3-datagram crateC-featureCategory: feature. This is adding a new feature.Category: feature. This is adding a new feature.E-mediumEffort: medium. Some knowledge of how the internals work would be useful.Effort: medium. Some knowledge of how the internals work would be useful.
Metadata
Metadata
Assignees
Labels
A-h3-datagramArea: h3-datagram crateArea: h3-datagram crateC-featureCategory: feature. This is adding a new feature.Category: feature. This is adding a new feature.E-mediumEffort: medium. Some knowledge of how the internals work would be useful.Effort: medium. Some knowledge of how the internals work would be useful.
We are maintaining a quic implementation, and we implemented h3. But when we updated h3-datagram to 0.0.2, we found that we could not implement
SendDatagram. Because the process of initializing the packet sender and sending the datagram is asynchronous, but the interface provided by h3-datagram is completely synchronous.For example, in order to get
SendDatagramErrorIncoming::NotAvailable/TooLarge, we must already know the peer's transport parameters. However, the handshake process is asynchronous rather than synchronous. Requiring implementors to already be on a handshake-completed connection would place a huge burden on quic implementors.In addition, a quic implementation may only buffer datagrams to a limited extent, so sending datagrams will hang while waiting for buffering, and the waiting process is also asynchronous.