-
Notifications
You must be signed in to change notification settings - Fork 50
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
Reconsider whether we need sub-protocol negotiation #536
Comments
Meeting:
|
I noted the ALPN header RFC during the call, I think the discussion us summarized under the final point Jan-Iver captured |
Meeting:
|
New header is available from the IETF side in this PR, so we should be fine to start offering a constructor that takes this list of protocol strings. |
So something like: const wt = new WebTransport(url, {protocols: ["moqt", "loc"]});
try {
await wt.ready;
console.log(wt.protocol); // "moqt" or "loc"
} catch (e) {
if (e.name != SomeUniqueError) throw;
// client did not provide a suitable protocol
} |
Meeting:
|
So, the reason we changed protocol from non-nullable to nullable is that this provides a way for applications that have not used subprotocols previously to start using them; it would make sense for the API to follow that logic.
I think we should pick some number and make sure that we support it, and reject everything above (the server has to pick one of the client-offered tokens, so if we say "reject above N bytes", that will be the de-facto limit). |
Both WebSocket and QUIC have a subprotocol negotiation mechanism (QUIC mandates ALPN, WebSocket has Sec-WebSocket-Protocol). When we designed WebTransport originally, we decided that between the application streams and the URL path/query, those are redundant.
Reasons why we may want to reconsider this:
Reasons why we may want to keep it as-is:
/api/update-entry
, you know what can be POSTed onto it, and what format the response will be).The text was updated successfully, but these errors were encountered: