Class WebTransportDatagramDuplexStream
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The WebTransportDatagramDuplexStream interface of the {{domxref("WebTransport API", "WebTransport API", "", "nocode")}} represents a duplex stream that can be used for unreliable transport of datagrams between client and server. Provides access to a ReadableStream for reading incoming datagrams, a WritableStream for writing outgoing datagrams, and various settings and statistics related to the stream.
[Value("WebTransportDatagramDuplexStream")]
public class WebTransportDatagramDuplexStream
- Inheritance
-
WebTransportDatagramDuplexStream
- Inherited Members
Remarks
This is accessed via the Datagrams property.
"Unreliable" means that transmission of data is not guaranteed, nor is arrival in a specific order. This is fine in some situations and provides very fast delivery. For example, you might want to transmit regular game state updates where each message supersedes the last one that arrives, and order is not important.
-Using WebTransport
-{{domxref("WebSockets API", "WebSockets API", "", "nocode")}}
-{{domxref("Streams API", "Streams API", "", "nocode")}}
-WebTransport over HTTP/3
Constructors
WebTransportDatagramDuplexStream()
public WebTransportDatagramDuplexStream()
Properties
IncomingHighWaterMark
The incomingHighWaterMark property of the WebTransportDatagramDuplexStream interface gets or sets the high water mark for incoming chunks of data — this is the maximum size, in chunks, that the incoming ReadableStream's internal queue can reach before it is considered full. See Internal queues and queuing strategies for more information.
[Value("incomingHighWaterMark")]
public double IncomingHighWaterMark { get; set; }
Property Value
- double
A number.
Remarks
-Using WebTransport
-{{domxref("WebSockets API", "WebSockets API", "", "nocode")}}
-{{domxref("Streams API", "Streams API", "", "nocode")}}
-WebTransport over HTTP/3
IncomingMaxAge
The incomingMaxAge property of the WebTransportDatagramDuplexStream interface gets or sets the maximum age for incoming datagrams, in milliseconds.
[Value("incomingMaxAge")]
public double? IncomingMaxAge { get; set; }
Property Value
- double?
A number, or
nullif no maximum age has been set.
Remarks
-Using WebTransport
-{{domxref("WebSockets API", "WebSockets API", "", "nocode")}}
-{{domxref("Streams API", "Streams API", "", "nocode")}}
-WebTransport over HTTP/3
MaxDatagramSize
The maxDatagramSize read-only property of the WebTransportDatagramDuplexStream interface returns the maximum allowable size of outgoing datagrams, in bytes, that can be written to Writable.
[Value("maxDatagramSize")]
public ulong MaxDatagramSize { get; }
Property Value
- ulong
A number.
Remarks
-Using WebTransport
-{{domxref("WebSockets API", "WebSockets API", "", "nocode")}}
-{{domxref("Streams API", "Streams API", "", "nocode")}}
-WebTransport over HTTP/3
OutgoingHighWaterMark
The outgoingHighWaterMark property of the WebTransportDatagramDuplexStream interface gets or sets the high water mark for outgoing chunks of data — this is the maximum size, in chunks, that the outgoing WritableStream's internal queue can reach before it is considered full. See Internal queues and queuing strategies for more information.
[Value("outgoingHighWaterMark")]
public double OutgoingHighWaterMark { get; set; }
Property Value
- double
A number.
Remarks
-Using WebTransport
-{{domxref("WebSockets API", "WebSockets API", "", "nocode")}}
-{{domxref("Streams API", "Streams API", "", "nocode")}}
-WebTransport over HTTP/3
OutgoingMaxAge
The outgoingMaxAge property of the WebTransportDatagramDuplexStream interface gets or sets the maximum age for outgoing datagrams, in milliseconds.
[Value("outgoingMaxAge")]
public double? OutgoingMaxAge { get; set; }
Property Value
- double?
A number, or
nullif no maximum age has been set.
Remarks
-Using WebTransport
-{{domxref("WebSockets API", "WebSockets API", "", "nocode")}}
-{{domxref("Streams API", "Streams API", "", "nocode")}}
-WebTransport over HTTP/3
Readable
The readable read-only property of the WebTransportDatagramDuplexStream interface returns a ReadableStream instance that can be used to unreliably read incoming datagrams from the stream.
[Value("readable")]
public ReadableStream Readable { get; }
Property Value
Remarks
"Unreliably" means that transmission of data is not guaranteed, nor is arrival in a specific order. This is fine in some situations and provides very fast delivery. For example, you might want to transmit regular game state updates where each message supersedes the last one that arrives, and order is not important.
-Using WebTransport
-{{domxref("WebSockets API", "WebSockets API", "", "nocode")}}
-{{domxref("Streams API", "Streams API", "", "nocode")}}
-WebTransport over HTTP/3
Writable
IMPORTANT
Deprecatedwritable read-only property of the WebTransportDatagramDuplexStream interface returns a WritableStream instance that can be used to unreliably write outgoing datagrams to the stream.
[Value("writable")]
public WritableStream Writable { get; }
Property Value
Remarks
"Unreliably" means that transmission of data is not guaranteed, nor is arrival in a specific order. This is fine in some situations and provides very fast delivery. For example, you might want to transmit regular game state updates where each message supersedes the last one that arrives, and order is not important.
-Using WebTransport
-{{domxref("WebSockets API", "WebSockets API", "", "nocode")}}
-{{domxref("Streams API", "Streams API", "", "nocode")}}
-WebTransport over HTTP/3