1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /* https://w3c.github.io/webtransport/#send-stream */
9 [Exposed=(Window,Worker), SecureContext, Pref="network.webtransport.enabled"]
10 interface WebTransportSendStream : WritableStream {
11 attribute long long? sendOrder;
12 Promise<WebTransportSendStreamStats> getStats();
15 /* https://w3c.github.io/webtransport/#send-stream-stats */
17 dictionary WebTransportSendStreamStats {
18 DOMHighResTimeStamp timestamp;
19 unsigned long long bytesWritten;
20 unsigned long long bytesSent;
21 unsigned long long bytesAcknowledged;
24 /* https://w3c.github.io/webtransport/#receive-stream */
26 [Exposed=(Window,Worker), SecureContext, Pref="network.webtransport.enabled"]
27 interface WebTransportReceiveStream : ReadableStream {
28 Promise<WebTransportReceiveStreamStats> getStats();
31 /* https://w3c.github.io/webtransport/#receive-stream-stats */
33 dictionary WebTransportReceiveStreamStats {
34 DOMHighResTimeStamp timestamp;
35 unsigned long long bytesReceived;
36 unsigned long long bytesRead;
39 /* https://w3c.github.io/webtransport/#bidirectional-stream */
41 [Exposed=(Window,Worker), SecureContext, Pref="network.webtransport.enabled"]
42 interface WebTransportBidirectionalStream {
43 readonly attribute WebTransportReceiveStream readable;
44 readonly attribute WebTransportSendStream writable;