Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webtransport: add message framing to allow graceful stream closing #606

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Mar 5, 2024

  1. webtransport: add message framing to allow graceful stream closing

    When closing streams some implementations [do not guarantee all data has been sent](https://issues.chromium.org/issues/326887753) before closing the stream.
    
    If this sounds familiar it's because we observed [exactly the same behaviour with WebRTC](https://issues.chromium.org/issues/40072842#comment5).
    
    This PR adds opt-in message framing to WebTransport streams that
    lets us introduce a similar `FIN`/`FIN_ACK` mechanism that guarentees
    the remote has received all data sent on a stream before we close it.
    
    It uses a Noise extension to signal to the remote that we will be
    framing all outgoing messages, with a recommendation that the framing
    is omitted if the remote does not signal the same in response.
    
    This is an attempt to make this a backwards-compatible change which
    will be a lot less disruptive, even if the status quo is a lot more
    unsafe.
    
    We're still waiting a definitive answer from the Chromium team as to
    whether the data loss on closing is a bug or a feature but I thought
    I'd open this early so we can move quickly if they confirm it's an
    oversight.
    achingbrain committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    ae7e26a View commit details
    Browse the repository at this point in the history