h3 icon indicating copy to clipboard operation
h3 copied to clipboard

Example on how to fetch datagrams from the underlying QUIC session

Open jvimal opened this issue 3 years ago • 0 comments

@stammw following up on the Discord question.

IIUC, QUIC supports both reliable streams and best-effort datagrams over the same cryptographic session established between two endpoints.

Although datagrams probably do not make sense for h3, it would still be useful if I can use h3 to share an already established QUIC session with datagram processing that could be happening concurrently. I haven't looked at h3 code very carefully, but it looks like h3 takes ownership/hides the underlying QUIC session, which would make getting datagrams a bit difficult.

For example, quinn-rs exposes Datagrams in the NewConnection struct, which has a poll_next() method that would be worth exposing: https://docs.rs/quinn/latest/quinn/struct.Datagrams.html#method.poll_next.

An example of how to do it would be great! Happy to chip in and contribute as well.

jvimal avatar Feb 07 '22 14:02 jvimal