Skip to content

Sending datagrams is asynchronous. #307

Open
@eareimu

Description

@eareimu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-h3-datagramArea: h3-datagram crateC-featureCategory: feature. This is adding a new feature.E-mediumEffort: medium. Some knowledge of how the internals work would be useful.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions