summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/interfaces/webtransport.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /testing/web-platform/tests/interfaces/webtransport.idl
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/interfaces/webtransport.idl')
-rw-r--r--testing/web-platform/tests/interfaces/webtransport.idl144
1 files changed, 144 insertions, 0 deletions
diff --git a/testing/web-platform/tests/interfaces/webtransport.idl b/testing/web-platform/tests/interfaces/webtransport.idl
new file mode 100644
index 0000000000..2bea483e1b
--- /dev/null
+++ b/testing/web-platform/tests/interfaces/webtransport.idl
@@ -0,0 +1,144 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: WebTransport (https://w3c.github.io/webtransport/)
+
+[Exposed=(Window,Worker), SecureContext]
+interface WebTransportDatagramDuplexStream {
+ readonly attribute ReadableStream readable;
+ readonly attribute WritableStream writable;
+
+ readonly attribute unsigned long maxDatagramSize;
+ attribute unrestricted double incomingMaxAge;
+ attribute unrestricted double outgoingMaxAge;
+ attribute unrestricted double incomingHighWaterMark;
+ attribute unrestricted double outgoingHighWaterMark;
+};
+
+[Exposed=(Window,Worker), SecureContext]
+interface WebTransport {
+ constructor(USVString url, optional WebTransportOptions options = {});
+
+ Promise<WebTransportStats> getStats();
+ readonly attribute Promise<undefined> ready;
+ readonly attribute WebTransportReliabilityMode reliability;
+ readonly attribute WebTransportCongestionControl congestionControl;
+ readonly attribute Promise<WebTransportCloseInfo> closed;
+ readonly attribute Promise<undefined> draining;
+ undefined close(optional WebTransportCloseInfo closeInfo = {});
+
+ readonly attribute WebTransportDatagramDuplexStream datagrams;
+
+ Promise<WebTransportBidirectionalStream> createBidirectionalStream(
+ optional WebTransportSendStreamOptions options = {});
+ /* a ReadableStream of WebTransportBidirectionalStream objects */
+ readonly attribute ReadableStream incomingBidirectionalStreams;
+
+ Promise<WebTransportSendStream> createUnidirectionalStream(
+ optional WebTransportSendStreamOptions options = {});
+ /* a ReadableStream of WebTransportReceiveStream objects */
+ readonly attribute ReadableStream incomingUnidirectionalStreams;
+};
+
+enum WebTransportReliabilityMode {
+ "pending",
+ "reliable-only",
+ "supports-unreliable",
+};
+
+dictionary WebTransportHash {
+ DOMString algorithm;
+ BufferSource value;
+};
+
+dictionary WebTransportOptions {
+ boolean allowPooling = false;
+ boolean requireUnreliable = false;
+ sequence<WebTransportHash> serverCertificateHashes;
+ WebTransportCongestionControl congestionControl = "default";
+};
+
+enum WebTransportCongestionControl {
+ "default",
+ "throughput",
+ "low-latency",
+};
+
+dictionary WebTransportCloseInfo {
+ unsigned long closeCode = 0;
+ USVString reason = "";
+};
+
+dictionary WebTransportSendStreamOptions {
+ long long? sendOrder = null;
+};
+
+dictionary WebTransportStats {
+ DOMHighResTimeStamp timestamp;
+ unsigned long long bytesSent;
+ unsigned long long packetsSent;
+ unsigned long long packetsLost;
+ unsigned long numOutgoingStreamsCreated;
+ unsigned long numIncomingStreamsCreated;
+ unsigned long long bytesReceived;
+ unsigned long long packetsReceived;
+ DOMHighResTimeStamp smoothedRtt;
+ DOMHighResTimeStamp rttVariation;
+ DOMHighResTimeStamp minRtt;
+ WebTransportDatagramStats datagrams;
+ unsigned long long? estimatedSendRate;
+};
+
+dictionary WebTransportDatagramStats {
+ DOMHighResTimeStamp timestamp;
+ unsigned long long expiredOutgoing;
+ unsigned long long droppedIncoming;
+ unsigned long long lostOutgoing;
+};
+
+[Exposed=(Window,Worker), SecureContext, Transferable]
+interface WebTransportSendStream : WritableStream {
+ Promise<WebTransportSendStreamStats> getStats();
+};
+
+dictionary WebTransportSendStreamStats {
+ DOMHighResTimeStamp timestamp;
+ unsigned long long bytesWritten;
+ unsigned long long bytesSent;
+ unsigned long long bytesAcknowledged;
+};
+
+[Exposed=(Window,Worker), SecureContext, Transferable]
+interface WebTransportReceiveStream : ReadableStream {
+ Promise<WebTransportReceiveStreamStats> getStats();
+};
+
+dictionary WebTransportReceiveStreamStats {
+ DOMHighResTimeStamp timestamp;
+ unsigned long long bytesReceived;
+ unsigned long long bytesRead;
+};
+
+[Exposed=(Window,Worker), SecureContext]
+interface WebTransportBidirectionalStream {
+ readonly attribute WebTransportReceiveStream readable;
+ readonly attribute WebTransportSendStream writable;
+};
+
+[Exposed=(Window,Worker), Serializable, SecureContext]
+interface WebTransportError : DOMException {
+ constructor(optional DOMString message = "", optional WebTransportErrorOptions options = {});
+
+ readonly attribute WebTransportErrorSource source;
+ readonly attribute octet? streamErrorCode;
+};
+
+dictionary WebTransportErrorOptions {
+ WebTransportErrorSource source = "stream";
+ [Clamp] octet? streamErrorCode = null;
+};
+
+enum WebTransportErrorSource {
+ "stream",
+ "session",
+};