Closed Bug 1790398 Opened 2 years ago Closed 2 years ago

Implement WebTransport session control

Categories

(Core :: Networking, task, P2)

task

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: kershaw, Assigned: dragana)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(3 files)

This bug will introduce two new nsIWebTransport interface:

interface nsIWebTransport {
  // When called, perform steps in "Initialization WebTransport over HTTP".
  void AsyncConnect(in nsIURI aURI,
                    in OriginAttributes aOriginAttributes,
                    in WebTransportSessionEventListener aListener);
  // Asynchronously get states.
  void GetStats();

  // Close the session.
  void CloseSession(in uint32_t aErrorCode,
                    in ACString aReason);

  // Create and open a new WebTransport stream. The function requires
  // the nsIWebTransportStreamCallback parameter. The result will be
  // delivered via the callback.
  void CreateOutgoingBidirectionalStream(in nsIWebTransportStreamCallback aCallback);
  void CreateOutgoingUnidirectionalStream(in nsIWebTransportStreamCallback aCallback);

  bool SendDatagram(in AUTF8String aDatagram);
};

// This interface is used as a callback when creating an outgoing
// unidirectional or bidirectional stream.
interface nsIWebTransportStreamCallback {
  void OnStreamReady(in nsIWebTransportSendStream aStream);
  
  void OnError(in uint8_t aError);
};

// Events related to a WebTransport session.
interface WebTransportSessionEventListener {
  // This is used to let the consumer of nsIWebTransport know that the
  // underlying WebTransportSession object is ready to use.
  void OnSessionReady(in uint64_t aSessionId);
  // This is used internally to pass the reference of WebTransportSession
  // object to WebTransportSessionProxy.
  void OnSessionReadyInternal(in WebTransportSession aSession);
  void OnSessionClosed(in uint32_t aErrorCode,
                       in ACString aReason);

  // When a new stream has been received.
  void OnIncomingBidirectionalStreamAvailable(in nsIWebTransportBidirectionalStream aStream);
  void OnIncomingUnidirectionalStreamAvailable(in nsIWebTransportReceiveStream aStream);

  // When a new datagram has been received.
  void OnDatagramReceived(in AUTF8String aDatagram);

  void OnStatsAvailable(in WebTransportStats aStats);
};

We will implement the session control part (creating and closing a session) in this bug.

Assignee: nobody → dd.mozilla
Status: NEW → ASSIGNED

This will alow reuse of many functions.
It will also inable use of queues that are going to be useful when polling is implemented.

AltSvc and 0RTT will not be used with WebTransport.

Attachment #9295573 - Attachment description: Implement creating of WebTransport session → Code implemention of the WebTransport session
Attachment #9295573 - Attachment description: Code implemention of the WebTransport session → Core implemention of the WebTransport session
Pushed by ddamjanovic@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/827abb353551
Add a WebTransport flag to nsHttpConnectionInfo and enable WebTransport feature negotiation in a HTTP/3 session r=necko-reviewers,valentin,kershaw
https://hg.mozilla.org/integration/autoland/rev/ed10210ab627
Create Http3StreamBase that will be inherit by Http3Stream and WebTransport streams r=necko-reviewers,valentin,kershaw
https://hg.mozilla.org/integration/autoland/rev/e9bf86398696
Core implemention of the WebTransport session r=necko-reviewers,kershaw,valentin

Backed out 5 changesets (Bug 1789858, Bug 1790392, Bug 1790398) for causing bustages on nsCORSListenerProxy.cpp (nsHttpChannel).
Backout link
Push with failures
Failure Log
Also Bp-hybrid Failure Log

Flags: needinfo?(dd.mozilla)

I will fix this. Thank you.

Flags: needinfo?(dd.mozilla)
Pushed by ddamjanovic@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/17760a618980
Add a WebTransport flag to nsHttpConnectionInfo and enable WebTransport feature negotiation in a HTTP/3 session r=necko-reviewers,valentin,kershaw
https://hg.mozilla.org/integration/autoland/rev/96f9a57193e4
Create Http3StreamBase that will be inherit by Http3Stream and WebTransport streams r=necko-reviewers,valentin,kershaw
https://hg.mozilla.org/integration/autoland/rev/d7c7dd524f32
Core implemention of the WebTransport session r=necko-reviewers,kershaw,valentin
Pushed by ddamjanovic@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9d7331dd64c8
Add a WebTransport flag to nsHttpConnectionInfo and enable WebTransport feature negotiation in a HTTP/3 session r=necko-reviewers,valentin,kershaw
https://hg.mozilla.org/integration/autoland/rev/93366266b85a
Create Http3StreamBase that will be inherit by Http3Stream and WebTransport streams r=necko-reviewers,valentin,kershaw
https://hg.mozilla.org/integration/autoland/rev/6ffb6a0029dc
Core implemention of the WebTransport session r=necko-reviewers,kershaw,valentin
Pushed by ddamjanovic@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f03238131804
Add a WebTransport flag to nsHttpConnectionInfo and enable WebTransport feature negotiation in a HTTP/3 session r=necko-reviewers,valentin,kershaw
https://hg.mozilla.org/integration/autoland/rev/3f39aaf65c29
Create Http3StreamBase that will be inherit by Http3Stream and WebTransport streams r=necko-reviewers,valentin,kershaw
https://hg.mozilla.org/integration/autoland/rev/55d75ccb0945
Core implemention of the WebTransport session r=necko-reviewers,kershaw,valentin

Backed out for causing build bustages on nsHttpChannel.cpp

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:6113:13: error: no matching constructor for initialization of 'mozilla::net::nsHttpConnectionInfo'
Flags: needinfo?(dd.mozilla)
Pushed by ddamjanovic@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/09e059bdb276
Add a WebTransport flag to nsHttpConnectionInfo and enable WebTransport feature negotiation in a HTTP/3 session r=necko-reviewers,valentin,kershaw
https://hg.mozilla.org/integration/autoland/rev/85726ba66ac6
Create Http3StreamBase that will be inherit by Http3Stream and WebTransport streams r=necko-reviewers,valentin,kershaw
https://hg.mozilla.org/integration/autoland/rev/f5e4af37bbb0
Core implemention of the WebTransport session r=necko-reviewers,kershaw,valentin
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
Flags: needinfo?(dd.mozilla)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: